Skip building indexes for probers that will only be probed once - #953
Skip building indexes for probers that will only be probed once#953yihozhang wants to merge 2 commits into
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #953 +/- ##
==========================================
+ Coverage 86.25% 86.31% +0.06%
==========================================
Files 95 96 +1
Lines 29269 29410 +141
==========================================
+ Hits 25245 25385 +140
- Misses 4024 4025 +1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Merging this PR will improve performance by 24.97%
|
| Mode | Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|---|
| ⚡ | Simulation | tests[python_array_optimize] |
1.4 s | 1.1 s | +24.97% |
Tip
Curious why this is faster? Comment @codspeedbot explain why this is faster on this PR, or directly use the CodSpeed MCP with your agent.
Comparing skip-1-prober (64e8fe3) with main (56b8460)
Footnotes
-
227 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩
|
What about the regressions for hardboiled? |
|
@ezrosent I'm not exactly sure about what leads to the regression (the regression seems to be consistent for this benchmark). My suspicion is that this is due to the atomic counter and the additional checking, and maybe the more bloated |
Profiling shows >50% of the indices are only built and then probed only once, so it is wasteful. This PR avoids building the index when this happens, and instead just scans the subset.
It also adds an index_stats module and a compile flag that, when enabled, shows the stats of indices built.
Also updated bench.py to interleave the execution when benchmarking.
Results:
I am not too sure how to eliminate the regression.