New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reduce frequencies buffer size when they are not needed #12954
Conversation
I wonder if there is a performance impact, since this is moving a condition from something that runs once per block of 128 docs to something that map run on every doc. |
Ohhh.. you said makes sense, i will check it. Thank you Adrien! |
I took several hours to confirm the results, the benchmark shows it became faster, this exceeded my expectation, we think the speedup is due to remove the loop that initializes the
Since if we always allocate the 128-size Benchmark output for the PR(using
|
+1 this sounds like a good idea! |
Here is the benchmark for new approach (avoid for-loop in so:
The Benchmark delta about new approach:
Benchmark result
I also ran a diff between two approaches:
Benchmark result
code for new approach is here the memory allocate flamegraph for |
This PR has not had activity in the past 2 weeks, labeling it as stale. If the PR is waiting for review, notify the dev@lucene.apache.org list. Thank you for your contribution! |
Close this in favor of #12997 |
Like #12832, maybe we can consider not using a fixed 128-size buffer for frequencies.