KEMBAR78
`vector_algorithms.cpp`: remove incorrect `__assume` by AlexGuteniev · Pull Request #5761 · microsoft/STL · GitHub
Skip to content

Conversation

@AlexGuteniev
Copy link
Contributor

The idea behind that __assume was to tell the compiler that memcpy is small.

Unfortunately, the compilers are still only able to optimize memcpy only for exactly known size, not "small" size or other size characteristics.

The __assume was also incorrect. as the comparison was bits vs bytes.

@AlexGuteniev AlexGuteniev requested a review from a team as a code owner October 4, 2025 08:16
@github-project-automation github-project-automation bot moved this to Initial Review in STL Code Reviews Oct 4, 2025
@StephanTLavavej StephanTLavavej added the enhancement Something can be improved label Oct 4, 2025
@StephanTLavavej StephanTLavavej moved this from Initial Review to Ready To Merge in STL Code Reviews Oct 4, 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 moved this from Ready To Merge to Merging in STL Code Reviews Oct 9, 2025
@StephanTLavavej StephanTLavavej merged commit 2251b37 into microsoft:main Oct 10, 2025
39 checks passed
@github-project-automation github-project-automation bot moved this from Merging to Done in STL Code Reviews Oct 10, 2025
@StephanTLavavej
Copy link
Member

Goodbye, single line of code! 🎉 🐱 🎉

@AlexGuteniev AlexGuteniev deleted the assume-nothing branch October 10, 2025 09:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Something can be improved

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants