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

remove allocation in oneelement mul #255

Merged
merged 2 commits into from
Jun 5, 2023

Conversation

jishnub
Copy link
Member

@jishnub jishnub commented May 24, 2023

Removes an inadvertent allocation in the 5-el mul! with a OneElement, in the beta != 0 case

On master

julia> A = Fill(2, 4, 4);

julia> B = OneElement(1, (1,2), (4,4));

julia> @btime mul!($(zero(B)), $A, $B, 1.0, 1.0);
  87.987 ns (1 allocation: 96 bytes)

This PR

julia> @btime mul!($(zero(B)), $A, $B, 1.0, 1.0);
  20.579 ns (0 allocations: 0 bytes)

@codecov
Copy link

codecov bot commented May 24, 2023

Codecov Report

Merging #255 (e1acc95) into master (c9d7d98) will not change coverage.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master     #255   +/-   ##
=======================================
  Coverage   99.74%   99.74%           
=======================================
  Files           5        5           
  Lines         774      774           
=======================================
  Hits          772      772           
  Misses          2        2           
Impacted Files Coverage Δ
src/oneelement.jl 100.00% <100.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@jishnub jishnub requested a review from dlfivefifty May 26, 2023 05:36
@dlfivefifty dlfivefifty merged commit 6aa6cf7 into JuliaArrays:master Jun 5, 2023
@jishnub jishnub deleted the muloneelalloc branch June 5, 2023 09:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants