Skip to content

Conversation

AlexGuteniev
Copy link
Contributor

Optimize LKG search and find_end.
Avoid calling equal in a loop.

Similar to #4654

Avoid calling equal in a loop. Similar to microsoft#4654
@AlexGuteniev AlexGuteniev requested a review from a team as a code owner April 22, 2025 19:03
@github-project-automation github-project-automation bot moved this to Initial Review in STL Code Reviews Apr 22, 2025
@StephanTLavavej StephanTLavavej added test Related to test code ASan Address Sanitizer labels Apr 22, 2025
@StephanTLavavej StephanTLavavej self-assigned this Apr 22, 2025
@StephanTLavavej StephanTLavavej removed their assignment Apr 23, 2025
@StephanTLavavej StephanTLavavej moved this from Initial Review to Ready To Merge in STL Code Reviews Apr 23, 2025
@StephanTLavavej StephanTLavavej removed the ASan Address Sanitizer label Apr 23, 2025
@StephanTLavavej
Copy link
Member

Thanks! 😻 This makes a big difference - on my 5950X, with an ASan build of the STL and ASan tests, I measured a reduction from 152.44 seconds to 96.21 seconds, for a speedup of 1.58x.

I removed the ASan label because this isn't necessarily ASan-specific though.

@StephanTLavavej StephanTLavavej moved this from Ready To Merge to Merging in STL Code Reviews Apr 23, 2025
@StephanTLavavej
Copy link
Member

I'm mirroring this to the MSVC-internal repo - please notify me if any further changes are pushed.

@StephanTLavavej StephanTLavavej merged commit d5f4f19 into microsoft:main Apr 23, 2025
39 checks passed
@github-project-automation github-project-automation bot moved this from Merging to Done in STL Code Reviews Apr 23, 2025
@StephanTLavavej
Copy link
Member

Thanks for speeding up this test of how you've sped up the library! 🚀 ⏱️ 🧑‍🔬

@AlexGuteniev AlexGuteniev deleted the hotspot branch April 23, 2025 22:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
test Related to test code
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants