jump-dev / Dualization.jl

Automatic dualization feature for MathOptInterface.jl
Other
97 stars 6 forks source link

Specialized set_dot for one-entry vector #135

Closed blegat closed 2 years ago

blegat commented 2 years ago
On the benchmark of https://github.com/jump-dev/MathOptInterface.jl/issues/1796, in terms of allocations: theta1 thetaG11
Before this PR 14.693 MB 793.687 GB
After this PR 0.395 MB 0.039 GB

and in terms of time:

theta1 thetaG11
Before this PR 28.5 ms 232 s
After this PR 0.586 ms 0.108 s

So for thetaG11, this gives a 20000x speedup in allocation and 2000x speedup in time.

Closes https://github.com/jump-dev/Dualization.jl/issues/66

codecov[bot] commented 2 years ago

Codecov Report

Merging #135 (9c6cd1e) into master (7fdfb40) will decrease coverage by 0.16%. The diff coverage is 86.66%.

@@            Coverage Diff             @@
##           master     #135      +/-   ##
==========================================
- Coverage   93.14%   92.97%   -0.17%     
==========================================
  Files          12       12              
  Lines         642      655      +13     
==========================================
+ Hits          598      609      +11     
- Misses         44       46       +2     
Impacted Files Coverage Δ
src/dual_equality_constraints.jl 90.07% <86.66%> (-0.61%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 7fdfb40...9c6cd1e. Read the comment docs.

guilhermebodin commented 2 years ago

Solves https://github.com/jump-dev/Dualization.jl/issues/66