Skip to content

Conversation

@odow
Copy link
Member

@odow odow commented Dec 2, 2025

x-ref #2888

Before

julia> @time main();
  6.228992 seconds (67.45 M allocations: 4.029 GiB, 16.71% gc time)

After

julia> @time main();
  5.684912 seconds (33.12 M allocations: 2.878 GiB, 16.25% gc time)

Code

function main()
    model = MOI.FileFormats.MPS.Model()
    MOI.read_from_file(model, "/Users/odow/Downloads/supportcase19.mps")
end

@odow
Copy link
Member Author

odow commented Dec 2, 2025

Here's a small win. A better approach might be to completely refactor the parser into something that didn't read one line by line, split into string tokens, and then parse.

@odow odow merged commit 300bad6 into master Dec 3, 2025
31 checks passed
@odow odow deleted the od/mps-read branch December 3, 2025 01:14
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.

2 participants