jump-dev / Convex.jl

A Julia package for disciplined convex programming
https://jump.dev/Convex.jl/stable/
Other
559 stars 119 forks source link

improve performance of `conv` #634

Closed ericphanson closed 2 months ago

ericphanson commented 2 months ago
julia> using Convex, BenchmarkTools

julia> x = rand(100_000);

julia> y = Variable(200);

julia> @btime conv($x, $y)

gives:

  1.286 s (56 allocations: 1.04 GiB) # master
  562.229 ms (37 allocations: 1.64 GiB) # PR

So 2x speed, but 1.6x allocations. I think it's a win overall, though not huge. Aimed at https://github.com/jump-dev/Convex.jl/issues/376

codecov[bot] commented 2 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 97.87%. Comparing base (96904be) to head (4ad7a93).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #634 +/- ## ======================================= Coverage 97.86% 97.87% ======================================= Files 88 88 Lines 5115 5127 +12 ======================================= + Hits 5006 5018 +12 Misses 109 109 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.