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

broadcast: simplify ndims #50695

Merged
merged 1 commit into from
Jul 31, 2023
Merged

broadcast: simplify ndims #50695

merged 1 commit into from
Jul 31, 2023

Conversation

vtjnash
Copy link
Member

@vtjnash vtjnash commented Jul 27, 2023

The extra dispatch was inconsistently used, which seemed unnecessary. Also make sure T is captured as a Type parameter in the closure (fast), instead of a value (potentially slow).

Very small difference measured (probably just noise):
broadcast (1) | 115.68 | 0.78 | 0.7 | 4245.13 | 849.62 before
broadcast (1) | 109.73 | 0.80 | 0.7 | 4243.89 | 788.25 after

The extra dispatch was inconsistently used, which seemed unnecessary.
Also make sure T is captured as a Type parameter in the closure (fast),
instead of a value (potentially slow).

Very small difference measured (probably just noise):
broadcast  (1) |   115.68 |   0.78 |  0.7 |    4245.13 |   849.62 before
broadcast  (1) |   109.73 |   0.80 |  0.7 |    4243.89 |   788.25 after
@vtjnash vtjnash added the broadcast Applying a function over a collection label Jul 27, 2023
@vtjnash vtjnash merged commit 6f0a9e5 into master Jul 31, 2023
@vtjnash vtjnash deleted the jn/broadcast-ndims branch July 31, 2023 16:27
vtjnash added a commit that referenced this pull request Aug 14, 2023
Fix #45759
Fix #46557
Fix #31485

Depends on #50694 due to a failing broadcast test without it (related to
#50695)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
broadcast Applying a function over a collection
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant