Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

This is mentioned in the memory layout section in the post.


I'm not sure what "a marker" is and how to make it take 0 bits of storage.


This is an upcoming behavior in Valhalla which isn't yet a part of Java so there's nothing final. Currently Valhalla has primitive and value object types that determine identity behavior.


You mean non-nullable object types then. Which are faster and take up less space because that's how the hardware works :)


They're not faster for all cases. Near memory works great for some edge cases such as looping on an array of data in a block.

This is very much a special edge case. For many other non-benchmark situations this isn't so simple. If you add the overhead of memory copying and lack of identity things are more complex.




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

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

Search: