Skip to content

Conversation

@odow
Copy link
Member

@odow odow commented Feb 11, 2026

Closes #2888

Before

julia> using JuMP

julia> filename = "/Users/odow/Downloads/supportcase19.mps"
"/Users/odow/Downloads/supportcase19.mps"

julia> @time read_from_file(filename)
  7.129035 seconds (43.28 M allocations: 4.544 GiB, 19.73% gc time)
supportcase19
├ solver: none
├ objective_sense: MIN_SENSE
│ └ objective_function_type: AffExpr
├ num_variables: 1429098
├ num_constraints: 4298007
│ ├ AffExpr in MOI.EqualTo{Float64}: 10351
│ ├ AffExpr in MOI.GreaterThan{Float64}: 362
│ ├ VariableRef in MOI.GreaterThan{Float64}: 1429098
│ ├ VariableRef in MOI.LessThan{Float64}: 1429098
│ └ VariableRef in MOI.Integer: 1429098
└ Names registered in the model: none

After

julia> using JuMP

julia> filename = "/Users/odow/Downloads/supportcase19.mps"
"/Users/odow/Downloads/supportcase19.mps"

julia> @time read_from_file(filename)
  3.720214 seconds (20.38 M allocations: 3.032 GiB, 30.93% gc time)
supportcase19
├ solver: none
├ objective_sense: MIN_SENSE
│ └ objective_function_type: AffExpr
├ num_variables: 1429098
├ num_constraints: 4298007
│ ├ AffExpr in MOI.EqualTo{Float64}: 10351
│ ├ AffExpr in MOI.GreaterThan{Float64}: 362
│ ├ VariableRef in MOI.GreaterThan{Float64}: 1429098
│ ├ VariableRef in MOI.LessThan{Float64}: 1429098
│ └ VariableRef in MOI.Integer: 1429098
└ Names registered in the model: none

@odow
Copy link
Member Author

odow commented Feb 11, 2026

We're still slower than HiGHS (which itself isn't the fastest), but we also do a lot more stuff than HIGHS to build the Julia data structures to go from JuMP -> MOI -> HiGHS.

julia> filename = "/Users/odow/Downloads/supportcase19.mps"
"/Users/odow/Downloads/supportcase19.mps"

julia> using HiGHS

julia> highs = Highs_create()
Ptr{Nothing}(0x0000000122580c00)

julia> @time Highs_readModel(highs, filename)
Running HiGHS 1.13.0 (git hash: 1bce6d5c8): Copyright (c) 2026 under Apache 2.0 license terms
Using BLAS: blastrampoline 
  2.759003 seconds (1.51 k allocations: 74.609 KiB, 0.14% compilation time)

@odow odow merged commit d2e1523 into master Feb 11, 2026
34 checks passed
@odow odow deleted the od/mps-read-inplace branch February 11, 2026 04:54
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.

[FileFormats.MPS] slowing reading of .mps file

1 participant