Skip to content
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

Move _Rng_from_urng and _Rng_from_urng_v2 out of <xutility> #3157

Merged
merged 2 commits into from
Oct 24, 2022

Conversation

StephanTLavavej
Copy link
Member

@StephanTLavavej StephanTLavavej commented Oct 14, 2022

After #3012, the compiler team reported a 6% throughput regression. We can fix this by moving some code around, making it slightly better than it originally was.

First, _Rng_from_urng_v2 is needed only in <random>, so we can move it and its <__msvc_int128.hpp> dependency there. (According to my understanding, this dependency is the main cause of the throughput regression.)

Second, _Rng_from_urng is needed only in <algorithm> and <random>, and <random> includes <algorithm>. Therefore, we can move it to <algorithm>. (I can't remember why I originally defined it in <xutility>.) We do need to be careful to close and reopen the _HAS_CXX17 guard.

These are pure code movements, no other changes.

Fixes VSO-1641134.

@StephanTLavavej StephanTLavavej added the throughput Must compile faster label Oct 14, 2022
@StephanTLavavej StephanTLavavej requested a review from a team as a code owner October 14, 2022 23:22
@StephanTLavavej StephanTLavavej self-assigned this Oct 21, 2022
@StephanTLavavej
Copy link
Member Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
throughput Must compile faster
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
  翻译: