-
Notifications
You must be signed in to change notification settings - Fork 314
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
Term indexer benchmark #304
base: master
Are you sure you want to change the base?
Conversation
MBkkt
commented
Jan 11, 2023
* Add ability to reuse term buffer * Add option for optimize index size if query only points
auto const count = state.range(0); | ||
for (auto _ : state) { | ||
for (int64_t i = 0; i < count; ++i) { | ||
auto value = indexer.GetIndexTerms(S2Testing::RandomPoint(), {}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're only testing the S2Point
overload. Is that the only one you care about?
For that one, you can easily exactly compute the size you need and reserve
it. I will add this and include it in the next PR.
What are the numbers when you do that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wrote answer in other PR.
Benchmarks became same if you make reserve, not because reserve make same it still N allocations instead of 1.
But because it's microbenchmark, and opposite to real code allocator has not other work
You're only testing the S2Point overload.
Not, but it's pretty same if we have covering (I added overload only for such functions)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is so much resistance about this?
I don't think it's needed for other API, like java or golang, because they care about performance a more little than cpp code