Performance improvement array_container_contains()#800
Conversation
1) Limit initial binsearch boundary by x value 2) Reorder conditional logic to follow the pattern "first find smallest item >= x", next perform return decision 3) Consume 16 remaining elements in blocks of four Tested on KabyLake. Overall this gives ~33% improvement in array_container_benchmark:contains_test and ~8% improvement in real_bitmaps_contains_benchmark.
|
Very interesting. Let us investigate! |
|
I am not forgetting this. |
|
Meanwhile, I realized that both For
|
|
@andreigudkov That's correct. The benchmarks are not great. |
|
The BEST_TIME macro is old crap. |
|
Note that I did not forget this PR. |
|
Before After Before: After |
|
It is a clear win with the updated benchmarks. So merging. |
Tested on KabyLake. Overall this gives ~33% improvement in array_container_benchmark:contains_test and ~8% improvement in real_bitmaps_contains_benchmark.
Before:
After: