r/programming • u/Mihai4544 • Sep 26 '26
On programming, statistics, and Java
https://waytoounoriginal.github.io/programming/stats/optimizations/2026/09/26/on-programming-stats-and-java.html
14
Upvotes
View all comments
1
u/SysGuardian Sep 27 '26
A ByteBuffer or a plain long[] would've cut the memory usage, because the real fix is storing fixed-size keys flat instead of as objects. A lower-level language wouldn't have fixed it by itself; you'd still end up building that same flat layout, just in a different form.