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

While a nice feat (32bit on <32GB heaps) 64bit pointers allows for storing metadata (more than 3bits* ) in the pointer itself. Having the class id alongside the pointer can be quite profitable. Other than that the 32bit pointers are a clear win with small heaps.

* If the hardware ignores the lower 3bits they can be utilized for various needs (e.g biased locking[0])

[0] http://www.azulsystems.com/blog/cliff/2010-01-09-biased-lock...




Generally, the hardware doesn't ignore those bits, so you'll need to mask em, and that costs some performance. All in all, it's probably a win, but it's not entirely free either. It really depends on what you're going to stick in those extra bits.

Java's assumption that you'll use those bits to address more memory is not a bad one; after all, for workloads between 4 and 32GB there's probably no optimization better than dramatically increasing memory density.




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

Search: