3 ms·
For large data structures I sometimes move them off the Java heap using the NIO/ByteBuffer APIs, which keeps my normal working set smaller. Only works for certa
by grandinj 7y ago
For large data structures I sometimes move them off the Java heap using the NIO/ByteBuffer APIs, which keeps my normal working set smaller.
Only works for certain use-cases though.
- kjeetgill 7y agoJava Unsafe can be great for moving things off heap too. And this is also the kinda place where pooling in Java can help more than it hurts. But all these solutions have a few sharp edges and aren't universally helpful. If/when Valhalla lands it'll help soften a few of the rough edges here.