4 ms·
I always wanted to have a tag in the object header that signals the GC to "just don't touch this object", so I could manually allocate off-heap objects and arra
by juancn 3y ago
I always wanted to have a tag in the object header that signals the GC to "just don't touch this object", so I could manually allocate off-heap objects and arrays (specially arrays).
ByteBuffers are low overhead, but native arrays are ~30% faster last I benchmarked, so if I can place an array off-heap, and never move it (granted, it's unsafe), I can use for example, the kernel's paging mechanism to swap data in and out data from disk, with low runtime overhead to access it.