Hacker News new | past | comments | ask | show | jobs | submit login

Ok taking a step back I just realized you aren't 'remram :P But anyways my point was that in the old scheme if you wanted to know where the class was you would do some arithmetic on the compressed pointer to get a full pointer and now you can do a comparison, or if you want to read something do a dereference. Assuming the new layout is an array of classes you have a similar scheme where you have an index and you can compare those directly, and if you want data in the class you deref.



Also, i believe that 'classes' aren't fixed size, because they contain the class's vtable [1]. As such, you couldn't keep them in an indexable array anyway.

[1] in HotSpot they are instances of InstanceKlass: https://github.com/openjdk/jdk/blob/master/src/hotspot/share...


I think they mean keep references to them in an indexable array.


That is the extra indirection I was talking about.


> in the old scheme if you wanted to know where the class was you would do some arithmetic on the compressed pointer to get a full pointer and now you can do a comparison

Well also you didn't actually need to decompress the pointer first - compressed pointers are unique as well of course.


Ah, yes, true.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: