3 ms·
I would be wary of microbenchmarks like this, especially when the faster sequence is bigger - keeping as much in cache as possible is more important for newer p
by userbinator 11y ago
I would be wary of microbenchmarks like this, especially when the faster sequence is bigger - keeping as much in cache as possible is more important for newer processors, and fetching NOPs wastes bandwidth without doing any useful work. A faster sequence of code won't be anymore if, upon exiting it, something else has to stall due to a cache miss. Pushing the function to the next alignment boundary might move the one after it as well, causing a cascade effect. If you can rearrange the code to spread out the jumps without making it bigger, that would be the best way to go.