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

<mdspan>: Throughput improvements #4559

Merged
merged 3 commits into from
Apr 9, 2024

Conversation

JMazurkiewicz
Copy link
Contributor

  • Use conjunction_v instead of fold expressions
  • Drive-by: remove unnecessary lambda in test_mdspan_support.hpp

@JMazurkiewicz JMazurkiewicz requested a review from a team as a code owner April 3, 2024 14:09
@StephanTLavavej StephanTLavavej added throughput Must compile faster mdspan C++23 mdspan labels Apr 3, 2024
@StephanTLavavej StephanTLavavej self-assigned this Apr 3, 2024
@cpplearner
Copy link
Contributor

cpplearner commented Apr 3, 2024

I fail to see how conjunction_v is better. It seems to cause more template instantiations in the happy path.

@StephanTLavavej
Copy link
Member

MSVC has a throughput optimization that directly recognizes conjunction_v although I'm not sure how much of a difference the short-circuiting will make.

stl/inc/mdspan Outdated Show resolved Hide resolved
@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 51b1a07 into microsoft:main Apr 9, 2024
35 checks passed
@StephanTLavavej
Copy link
Member

Thanks for looking out for ways to improve build throughput - it's like catnip for programmers! 🐈 🐈‍⬛ 😻

@JMazurkiewicz JMazurkiewicz deleted the mdspan/throughput branch April 10, 2024 08:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mdspan C++23 mdspan throughput Must compile faster
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants