Better linked-list traversal in BPF
Better linked-list traversal in BPF
Posted Mar 9, 2024 6:36 UTC (Sat) by epa (subscriber, #39769)In reply to: Better linked-list traversal in BPF by mb
Parent article: Better linked-list traversal in BPF
You need to load the next pointer but the processor can learn that it’s usually the following address and load it speculatively. Whereas if you simply dereference it the processor might not be able to look so far ahead. That’s my thinking.
If the flag to say “just increment” were included in a part of the data structure you have to load anyway, then it might save some memory access too.
