Skip to content

Conversation

@CaseyCarter
Copy link
Contributor

This reverts the reversion of #3712 from #3819. It also detects allocators publicly derived from std::allocator, and refuses to use allocate_at_least in such a case to avoid potential mismatch between a user's deallocate and the default allocate_at_least.

I expect we'll squash merge this, but I've kept it as two separate commits for ease of review: one that reverts the revert, and one that implements the fix.

.... since pre-C++23 allocators may override `deallocate` in a way that is not compatible with `std::allocator::allocate_at_least`.
@CaseyCarter CaseyCarter added the performance Must go faster label Jul 11, 2023
@CaseyCarter CaseyCarter requested a review from a team as a code owner July 11, 2023 18:39
@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 171066e into microsoft:main Jul 14, 2023
@StephanTLavavej
Copy link
Member

Thanks for restoring this optimization! May the RWC be ever in your favor. 😹 🚀 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

performance Must go faster

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants