Closed sethaxen closed 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.
cdensity
cumsum
Nice, thanks!
The recipe for
cdensity
computescumsum
but allocating all subarrays. This is incredibly wasteful. This PR usescumsum
. For a vector of length 1000, this part of the recipe is 100x faster.