Possible HashSet memory improvement
Philippe Marschall
kustos at gmx.net
Sun Oct 6 18:09:23 UTC 2013
On 05.10.2013 21:57, Brian Goetz wrote:
>> Is there something I missed? Is this something that has been considered?
>
> If memory efficiency were the only metric in the world, this would be a no-brainer. But, by having different classes for different nodes, many many paths where the VM could prove monomorphism and thereby inline through now become polymorphic and at best could be inline cached.
>
> ...
>
Doesn't the rb-tree collision handling in HashMap already introduce
different classes for different nodes (Node and TreeNode)? Or is the
assumption there that this doesn't happen in production and therefore
does not introduce polymorphism?
Cheers
Philippe
More information about the core-libs-dev
mailing list