-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Optimize equality comparison of two empty string_view
s
#4904
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.
Some minor nits that I'll apply.
string_view
s (#3310)string_view
s
Thanks, this is great! 😻 I pushed a commit for trivial naming nitpicks, and verified that there's a significant speedup for empty comparisons (I observed 1.7x, from 37.4 ns down to 22.0 ns). We merge PRs to our GitHub and MSVC-internal repos simultaneously in a semi-manual process, batched up to save time. Your PR will be part of the next batch. I'll post comments here as I prepare this for merging! |
I'm mirroring this to the MSVC-internal repo - please notify me if any further changes are pushed. |
Thanks for this significant performance improvement - it's a small change but it affects extremely common operations (both This is expected to ship in VS 2022 17.12 Preview 3. |
Fixes #3310.