jump-dev / MathOptInterface.jl

A data structure for mathematical optimization problems
http://jump.dev/MathOptInterface.jl/
Other
380 stars 86 forks source link

[Nonlinear] improve parsing performance of Scalar(Affine,Quadratic)Function #2487

Closed odow closed 3 months ago

odow commented 3 months ago

Part of https://github.com/jump-dev/JuMP.jl/issues/3729

Before

julia> GC.gc(); @time main3();
  1.165808 seconds (11.14 M allocations: 795.583 MiB, 37.12% gc time)

after

julia> GC.gc(); @time main3();
  0.455849 seconds (2.60 M allocations: 507.575 MiB, 14.25% gc time)