Closed
Description
This SO answer shows a 20% speed-up on binary_search
with prefetching enabled at the cost of:
- trashing at most 2 cache lines when an element is found (since two other elements will be prefetched),
- increasing code-size with prefetching instructions.
We should consider adding this optimization if it turns out to be worth it.