JuliaPlots / StatsPlots.jl

Statistical plotting recipes for Plots.jl
Other
440 stars 90 forks source link

Use cumsum in the cdensity recipe #422

Closed sethaxen closed 3 years ago

sethaxen commented 3 years ago

The recipe for cdensity computes cumsum but allocating all subarrays. This is incredibly wasteful. This PR uses cumsum. For a vector of length 1000, this part of the recipe is 100x faster.

daschw commented 3 years ago

Nice, thanks!