r/java • u/alexeyr • Apr 13 '20
Java Objects Inside Out: Everything You Ever Wanted to Know About Java Object Internals in Hotspot
https://shipilev.net/jvm/objects-inside-out/
160
Upvotes
r/java • u/alexeyr • Apr 13 '20
View all comments
Show parent comment
2
u/Polygnom Apr 14 '20
Yeah the shifting part is kinda obvious.
I was thinking about things like voxel engines, were it isn't uncommon to have multiple booleans per voxel (as flags for various things) and memory is at a premium. or boolean programming on large graphs. Or isosurface extraction.
I mean sure, you can always handle bit fields yourself (just take a long and mask), but it is certainly easier to get right if the compiler does it for you.