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>: Cache fwd-prod-of-extents and rev-prod-of-extents when all extents are static #3715

Merged

Conversation

JMazurkiewicz
Copy link
Contributor

@JMazurkiewicz JMazurkiewicz commented May 17, 2023

When all extents are static we can cache fwd-prod-of-extents and rev-prod-of-extents:

  • _Fwd_prod_of_extents and _Rev_prod_of_extents are not member functions of extents anymore (they are classes),
  • When all extents are static, then those classes contain static array with all possible fwd or rev products.

After getting WG21-P2647R1 in MSVC we can restore member functions and make caching arrays local to them.

@JMazurkiewicz JMazurkiewicz requested a review from a team as a code owner May 17, 2023 22:25
@CaseyCarter CaseyCarter added performance Must go faster mdspan C++23 mdspan labels May 17, 2023
@StephanTLavavej StephanTLavavej merged commit 5e7a0f4 into microsoft:feature/mdspan2 May 24, 2023
@StephanTLavavej
Copy link
Member

Thanks for this neat perf improvement! 🚀 🐇 🐆

@JMazurkiewicz JMazurkiewicz deleted the mdspan/cache-prods branch May 24, 2023 23:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mdspan C++23 mdspan performance Must go faster
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants