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 over vec(data) for row vectors #317

Closed
wants to merge 2 commits into from

Conversation

jishnub
Copy link
Member

@jishnub jishnub commented Feb 13, 2023

On master

julia> A = BandedMatrix(0=>Float64[1:3000;]); v = rand(size(A,1));

julia> @btime $A .* $v';
  10.199 μs (5 allocations: 23.59 KiB)

This PR

julia> @btime $A .* $v';
  2.840 μs (7 allocations: 23.69 KiB)

Similar to #303, this also broadcasts over vec(data) if data is a row vector, to enforce the use of linear indexing.

@codecov
Copy link

codecov bot commented Feb 13, 2023

Codecov Report

Base: 81.83% // Head: 81.81% // Decreases project coverage by -0.03% ⚠️

Coverage data is based on head (bb43f42) compared to base (e74f057).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #317      +/-   ##
==========================================
- Coverage   81.83%   81.81%   -0.03%     
==========================================
  Files          24       24              
  Lines        3320     3316       -4     
==========================================
- Hits         2717     2713       -4     
  Misses        603      603              
Impacted Files Coverage Δ
src/generic/broadcast.jl 94.08% <100.00%> (-0.04%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@dlfivefifty
Copy link
Member

I'm skeptical about these performance improvements that really should be in Base....

@jishnub
Copy link
Member Author

jishnub commented Feb 15, 2023

I understand your concern, and I agree that these should be in Base. Hope that happens soon.

@jishnub jishnub closed this Feb 15, 2023
@jishnub jishnub deleted the vecrowbcast branch February 16, 2023 12:49
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