3 ms·
It's not an issue of allocation, it's an issue of allocation location to get better cache locality. Take the JVM, a good majority of ORM databases uses Sun.mis
by vvanders 9y ago
It's not an issue of allocation, it's an issue of allocation location to get better cache locality.
Take the JVM, a good majority of ORM databases uses Sun.misc.unsafe to do manual native memory allocation. Not because it's faster(because it isn't faster than bumping the nursery pointer).
They do it so they can control where disparate datatypes live in memory so that as a cache line is read in the prefetcher is already pulling in the next cache line.
Things like this will get you a 10-50x performance increase, which in some cases you absolutely need it.
- xfer 9y agoSure, but like you said, 98% don't need it and there is indeed a substitute when you need it.