3 ms·
Interesting. At first I thought you were claiming this technique made linked lists cache friendly. After looking at it, I have concluded you meant merely that t
by charlieflowers 11y ago
Interesting. At first I thought you were claiming this technique made linked lists cache friendly. After looking at it, I have concluded you meant merely that the next and prev pointers are near your data. Am I understanding you correctly?
- krakensden 11y agoThat's my understanding too. Instead of going to your data structure, and then dereferencing a pointer to your data, after going to your data structure, you're already there.
- exDM69 11y agoYes, there's one pointer chase less when you don't have a pointer from the link node to the data, but you can get it with offsetof. This can save a significant number of cache misses in some algorithms.