4 ms·
...time it takes to chase a random pointer compared to doing literally anything else... When I have had to do serious stuff with linked lists, trees, and so on
by btilly 7y ago
...time it takes to chase a random pointer compared to doing literally anything else...
When I have had to do serious stuff with linked lists, trees, and so on, I found that it was much, much faster to assign an array of nodes, and allocate the linked list out of that close together. There was a lot of complexity in doing so but colocating data to match my access pattern was a big win.