4 ms·
Note that the article's "improved" data structure is 30% slower than the naive binary heap when there's no VM pressure. And his heap is small compared to the c
by haberman 16y ago
Note that the article's "improved" data structure is 30% slower than the naive binary heap when there's no VM pressure. And his heap is small compared to the cache itself.
In other words, if he had just used mlock() to make sure his heap wasn't getting swapped out, he would have gotten better performance and avoided the need to invent a "new" data structure. He chose a really bad example to get on a soapbox about.
- deleted 16y ago[deleted]
- davidcuddeback 16y agoFTA: A 300-GB backing store, memory mapped on a machine with no more than 16 GB of RAM, is quite typical. The user paid for 64 bits of address space, and I am not afraid to use it. He's writing a data structure that's not intended to fit within physical memory. mlock() doesn't do you any good in that scenario.
- rlpb 16y agoI think your quote is about the entire cache, not just the heap.