-
Notifications
You must be signed in to change notification settings - Fork 84
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
Better stable branch hints #358
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.
This looks really cool :) thanks for sharing it and contributing it!
The differences don't seem to be in the 8% range but they are measurable through the benchmarks :D well done 👍
|
Heh, I guess the 8% were just my laptop acting up a bit then |
:D no harm it's an improvement one way or the other, doesn't always need to be 8%, this gives 1% in the tests, and might very well do more in other situations. What matters is that it's better in all situations so it's not a fluke but a through the board improvement 🚀 |
(This is a relatively small change, hence no prior discussion in an issue)
This PR adapts the technique outlined in
hashbrown
for branch hints on stable, utilizing the#[cold]
attribute.In my local benchmarks I observed an improvement of ~8-13% on average (but I'm not quite sure how many of these were flukes).