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

improve heatmap_edges performance #4539

Merged
merged 4 commits into from
Nov 22, 2022
Merged

improve heatmap_edges performance #4539

merged 4 commits into from
Nov 22, 2022

Conversation

t-bltg
Copy link
Member

@t-bltg t-bltg commented Nov 22, 2022

Partial improvement for #4520.

using BenchmarkTools, Plots

const mat = randn(1024, 1024);

@btime show(devnull, heatmap($mat))
  35.233 ms (632 allocations: 8.10 MiB)  # PR
  35.512 ms (4670 allocations: 8.25 MiB)  # master

f(x, n = 100) = begin
    plot()
    for _ in 1:n
        heatmap!(x)
    end
end

@btime f($mat)
  2.320 s (42563 allocations: 807.30 MiB)  # PR
  2.348 s (446363 allocations: 822.83 MiB)  # master

@codecov
Copy link

codecov bot commented Nov 22, 2022

Codecov Report

Base: 91.00% // Head: 90.83% // Decreases project coverage by -0.16% ⚠️

Coverage data is based on head (f702fb9) compared to base (04fefce).
Patch coverage: 89.23% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4539      +/-   ##
==========================================
- Coverage   91.00%   90.83%   -0.17%     
==========================================
  Files          40       40              
  Lines        7702     7694       -8     
==========================================
- Hits         7009     6989      -20     
- Misses        693      705      +12     
Impacted Files Coverage Δ
src/utils.jl 92.52% <87.03%> (-0.95%) ⬇️
src/axes.jl 90.52% <100.00%> (-0.03%) ⬇️
RecipesPipeline/src/group.jl 90.54% <0.00%> (-4.06%) ⬇️
src/backends/gr.jl 91.63% <0.00%> (-0.36%) ⬇️
src/layouts.jl 95.44% <0.00%> (-0.29%) ⬇️
src/components.jl 89.81% <0.00%> (-0.27%) ⬇️
src/recipes.jl 84.55% <0.00%> (+0.23%) ⬆️

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.

@t-bltg t-bltg added performance speedups and slowdowns nfc non-functional change labels Nov 22, 2022
@t-bltg t-bltg changed the title update perf update performance Nov 22, 2022
@t-bltg t-bltg changed the title update performance update heatmap_edges performance Nov 22, 2022
@t-bltg t-bltg changed the title update heatmap_edges performance improve heatmap_edges performance Nov 22, 2022
@t-bltg t-bltg merged commit 66b212b into JuliaPlots:master Nov 22, 2022
@t-bltg t-bltg deleted the hm branch November 22, 2022 21:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
nfc non-functional change performance speedups and slowdowns
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant