-
Notifications
You must be signed in to change notification settings - Fork 795
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
Implement set iterators in terms of limited API #1167
Conversation
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.
As this looks like it could have performance drawbacks, can we perhaps consider in this case having two implementations depending on the API available?
Or at least a benchmark showing that the difference is not meaningful.
(We have some benchmarks for iterating list and dict so should be able to duplicate them easily for set.)
I'll do a PR adding the benchmark to |
Are there instructions on running benchmarks? |
|
The measurements are a bit noisy, because I'm running on a laptop, but |
|
+1 - I think that as we've already got both implementations written, and a single test will cover both APIs depending on the features, it's easy for us to support both. 10-15% may not be huge, but for some people the choice of Rust is for everything to be as fast as possible, so they will still appreciate this. |
8fdeeee
to
d8f7869
Compare
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.
Thanks, LGTM!
I meant 'probably we don't need |
@kngwyu we do -- it needs to |
OK, that makes sense. |
No description provided.