Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add SnoopPrecompile directive #147

Merged
merged 5 commits into from
Jan 23, 2023
Merged

Add SnoopPrecompile directive #147

merged 5 commits into from
Jan 23, 2023

Conversation

odow
Copy link
Member

@odow odow commented Jan 22, 2023

x-ref jump-dev/MathOptInterface.jl#2226

Before

julia> @time using JuMP, HiGHS
  7.294264 seconds (9.44 M allocations: 615.447 MiB, 3.88% gc time, 0.21% compilation time)

julia> @time @eval begin
           let
               model = Model(HiGHS.Optimizer)
               @variable(model, x >= 0)
               @variable(model, 0 <= y <= 3)
               @objective(model, Min, 12x + 20y)
               @constraint(model, c1, 6x + 8y >= 100)
               @constraint(model, c2, 7x + 12y >= 120)
               optimize!(model)
           end
       end;
Running HiGHS 1.4.0 [date: 1970-01-01, git hash: bcf6c0b22]
Copyright (c) 2022 ERGO-Code under MIT licence terms
Presolving model
2 rows, 2 cols, 4 nonzeros
2 rows, 2 cols, 4 nonzeros
Presolve : Reductions: rows 2(-0); columns 2(-0); elements 4(-0) - Not reduced
Problem not reduced by presolve: solving the LP
Using EKK dual simplex solver - serial
  Iteration        Objective     Infeasibilities num(sum)
          0     0.0000000000e+00 Pr: 2(220) 0s
          2     2.0500000000e+02 Pr: 0(0) 0s
Model   status      : Optimal
Simplex   iterations: 2
Objective value     :  2.0500000000e+02
HiGHS run time      :          0.00
  5.872492 seconds (7.41 M allocations: 1.216 GiB, 6.91% gc time, 99.80% compilation time)

After

julia> @time using JuMP, HiGHS
  7.860564 seconds (10.01 M allocations: 648.535 MiB, 3.45% gc time, 0.21% compilation time)

julia> @time @eval begin
           let
               model = Model(HiGHS.Optimizer)
               @variable(model, x >= 0)
               @variable(model, 0 <= y <= 3)
               @objective(model, Min, 12x + 20y)
               @constraint(model, c1, 6x + 8y >= 100)
               @constraint(model, c2, 7x + 12y >= 120)
               optimize!(model)
           end
       end;
Running HiGHS 1.4.0 [date: 1970-01-01, git hash: bcf6c0b22]
Copyright (c) 2022 ERGO-Code under MIT licence terms
Presolving model
2 rows, 2 cols, 4 nonzeros
2 rows, 2 cols, 4 nonzeros
Presolve : Reductions: rows 2(-0); columns 2(-0); elements 4(-0) - Not reduced
Problem not reduced by presolve: solving the LP
Using EKK dual simplex solver - serial
  Iteration        Objective     Infeasibilities num(sum)
          0     0.0000000000e+00 Pr: 2(220) 0s
          2     2.0500000000e+02 Pr: 0(0) 0s
Model   status      : Optimal
Simplex   iterations: 2
Objective value     :  2.0500000000e+02
HiGHS run time      :          0.00
  1.823514 seconds (1.49 M allocations: 844.821 MiB, 13.36% gc time, 99.44% compilation time)

The last part is due to an instability in Utilities.default_copy_to that I need to figure out how to resolve.

@codecov
Copy link

codecov bot commented Jan 22, 2023

Codecov Report

Base: 84.85% // Head: 81.66% // Decreases project coverage by -3.19% ⚠️

Coverage data is based on head (5af357c) compared to base (9ec05c3).
Patch has no changes to coverable lines.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     jump-dev/JuMP.jl#147      +/-   ##
==========================================
- Coverage   84.85%   81.66%   -3.19%     
==========================================
  Files           3        3              
  Lines        1505     1505              
==========================================
- Hits         1277     1229      -48     
- Misses        228      276      +48     
Impacted Files Coverage Δ
src/HiGHS.jl 100.00% <ø> (ø)
src/gen/libhighs.jl 31.14% <0.00%> (-6.56%) ⬇️
src/MOI_wrapper.jl 91.41% <0.00%> (-2.55%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@odow odow merged commit de4a6c1 into master Jan 23, 2023
@odow odow deleted the od/precompile branch January 23, 2023 00:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant