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

Precompile instructions for basic algebra operations #292

Merged
merged 3 commits into from
Jan 27, 2023

Conversation

jishnub
Copy link
Member

@jishnub jishnub commented Jan 12, 2023

A simpler alternative to #283, without the need for extra packages, and one that seems to work almost as well for many cases.

After this, the time to first execution practically disappears for addition and subtraction for the common use case where the parent is a Matrix{Float64}

julia> using BandedMatrices

julia> B = BandedMatrix(0=>ones(1000));

julia> @time B + B;
  0.000110 seconds (63 allocations: 11.375 KiB)

Some others aren't completely eliminated, but considerably improved:

julia> v = ones(size(B,2));

julia> @time @eval B * v;
  0.009193 seconds (8.87 k allocations: 556.567 KiB)

@codecov
Copy link

codecov bot commented Jan 12, 2023

Codecov Report

Base: 80.55% // Head: 80.55% // No change to project coverage 👍

Coverage data is based on head (033dd22) compared to base (dfbf44f).
Patch has no changes to coverable lines.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #292   +/-   ##
=======================================
  Coverage   80.55%   80.55%           
=======================================
  Files          23       23           
  Lines        3270     3270           
=======================================
  Hits         2634     2634           
  Misses        636      636           
Impacted Files Coverage Δ
src/BandedMatrices.jl 100.00% <ø> (ø)

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 dlfivefifty merged commit 9a573b1 into JuliaLinearAlgebra:master Jan 27, 2023
@jishnub jishnub deleted the precompile branch January 27, 2023 12:07
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