Speed up MOI backend extraction - #103
Merged
Merged
Conversation
Performance Report -
|
| case | main |
dev |
diff |
|---|---|---|---|
/constructors/n=128/Model/MOI/bool |
686.167 μs (743.771 μs) ± 583.827 μs | 273.385 μs (293.935 μs) ± 405.620 μs | improvement (-60.16%) |
/constructors/n=128/Model |
703.302 μs (748.313 μs) ± 974.580 μs | 699.706 μs (736.071 μs) ± 971.912 μs | invariant (-0.51%) |
/constructors/n=2048/Model/MOI/bool |
29.523 ms (31.194 ms) ± 38.367 ms | 9.565 ms (10.429 ms) ± 21.548 ms | improvement (-67.60%) |
/constructors/n=2048/Model |
29.429 ms (33.687 ms) ± 26.634 ms | 29.242 ms (32.882 ms) ± 24.606 ms | invariant (-0.64%) |
/constructors/n=384/Model/MOI/bool |
2.102 ms (2.462 ms) ± 765.996 μs | 822.538 μs (893.394 μs) ± 469.064 μs | improvement (-60.88%) |
/constructors/n=384/Model |
2.531 ms (2.839 ms) ± 1.624 ms | 2.519 ms (2.736 ms) ± 1.771 ms | invariant (-0.51%) |
/constructors/tsp/cities=36/Model/MOI/bool |
110.200 ms (117.047 ms) ± 99.555 ms | 37.175 ms (39.814 ms) ± 51.694 ms | improvement (-66.27%) |
/constructors/tsp/cities=36/Model |
66.249 ms (71.440 ms) ± 59.286 ms | 66.469 ms (71.532 ms) ± 57.396 ms | invariant (0.33%) |
/conversions/n=128/form/Dict |
189.261 μs (229.440 μs) ± 3.009 ms | 181.259 μs (219.951 μs) ± 2.949 ms | invariant (-4.23%) |
/conversions/n=128/form/Matrix/Float32 |
39.578 μs (46.258 μs) ± 169.271 μs | 39.378 μs (47.360 μs) ± 210.264 μs | invariant (-0.51%) |
/conversions/n=128/form/Matrix |
51.536 μs (61.271 μs) ± 2.991 ms | 50.535 μs (60.509 μs) ± 2.899 ms | invariant (-1.94%) |
/conversions/n=128/form/SparseMatrixCSC |
158.736 μs (179.115 μs) ± 215.151 μs | 178.605 μs (193.066 μs) ± 251.879 μs | invariant (12.52%) |
/conversions/n=128/ising/Matrix |
51.476 μs (62.082 μs) ± 2.958 ms | 52.428 μs (60.710 μs) ± 2.948 ms | invariant (1.85%) |
/conversions/n=128/qubo/Matrix/min |
643.263 μs (685.781 μs) ± 7.437 ms | 632.307 μs (687.584 μs) ± 7.158 ms | invariant (-1.70%) |
/conversions/n=128/qubo/Matrix |
335.307 μs (373.253 μs) ± 5.337 ms | 339.333 μs (375.306 μs) ± 4.398 ms | invariant (1.20%) |
/conversions/n=384/form/Dict |
371.901 μs (638.887 μs) ± 3.515 ms | 382.217 μs (649.772 μs) ± 3.613 ms | invariant (2.77%) |
/conversions/n=384/form/Matrix/Float32 |
170.312 μs (226.696 μs) ± 11.617 ms | 172.325 μs (234.318 μs) ± 10.987 ms | invariant (1.18%) |
/conversions/n=384/form/Matrix |
273.786 μs (371.220 μs) ± 19.145 ms | 279.895 μs (398.375 μs) ± 17.659 ms | invariant (2.23%) |
/conversions/n=384/form/SparseMatrixCSC |
1.139 ms (1.430 ms) ± 8.349 ms | 1.407 ms (1.533 ms) ± 6.045 ms | regression (23.51%) |
/conversions/n=384/ising/Matrix |
278.974 μs (381.385 μs) ± 19.177 ms | 318.021 μs (404.709 μs) ± 18.504 ms | invariant (14.00%) |
/conversions/n=384/qubo/Matrix/min |
6.231 ms (6.405 ms) ± 39.587 ms | 6.255 ms (6.417 ms) ± 34.210 ms | invariant (0.37%) |
/conversions/n=384/qubo/Matrix |
3.155 ms (3.314 ms) ± 30.317 ms | 3.193 ms (3.354 ms) ± 28.902 ms | invariant (1.18%) |
/evaluation/n=128/value/dense-form |
363.548 μs (396.268 μs) ± 686.730 μs | 363.910 μs (394.024 μs) ± 557.745 μs | invariant (0.10%) |
/evaluation/n=128/value/dict-form |
267.596 μs (268.828 μs) ± 5.611 μs | 267.566 μs (268.598 μs) ± 6.946 μs | invariant (-0.01%) |
/evaluation/n=128/value/model |
52.057 μs (82.492 μs) ± 680.651 μs | 51.256 μs (53.769 μs) ± 368.677 μs | invariant (-1.54%) |
/evaluation/n=128/value/sparse-form |
51.176 μs (82.182 μs) ± 683.550 μs | 51.256 μs (62.838 μs) ± 496.000 μs | invariant (0.16%) |
/evaluation/n=384/value/dense-form |
4.221 ms (4.248 ms) ± 198.270 μs | 4.219 ms (4.287 ms) ± 203.352 μs | invariant (-0.06%) |
/evaluation/n=384/value/dict-form |
501.173 μs (509.396 μs) ± 9.242 μs | 501.864 μs (509.866 μs) ± 9.508 μs | invariant (0.14%) |
/evaluation/n=384/value/model |
172.486 μs (181.109 μs) ± 218.221 μs | 175.880 μs (185.105 μs) ± 181.197 μs | invariant (1.97%) |
/evaluation/n=384/value/sparse-form |
171.975 μs (178.825 μs) ± 230.640 μs | 175.160 μs (185.214 μs) ± 205.549 μs | invariant (1.85%) |
bernalde
commented
Jun 13, 2026
bernalde
left a comment
Member
Author
There was a problem hiding this comment.
Blocking issues: none.
Nonblocking issues: none.
Questions: none.
Tests run and outcomes:
- Verified local merge-base diff against GitHub-reported totals: 6 files, +411, -64.
julia --project=benchmark benchmark/test/runtests.jlpassed: Benchmark Fixtures 17/17, Benchmark Suites 8/8.julia +1.12 --project=. -e 'import Pkg; Pkg.test()'passed: 1111/1111.- 10,000-variable dense TSP extraction check passed: 1,980,000 quadratic terms, 1.152567399 seconds, 209,034,792 bytes allocated.
gh pr checks 103reports all checks passing.
Merge-readiness: code is merge-ready from this review. The PR is authored by my GitHub account, so this is submitted as COMMENT; a formal approval must come from another maintainer.
bernalde
marked this pull request as ready for review
June 13, 2026 00:31
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
QUBOTOOLS_SCALE_BENCHMARKS=true.QUBOTools.Model(moi_model)as the supported public MOI/ToQUBO materialization path.Tests
julia --project=benchmark benchmark/test/runtests.jl- passed.julia +1.12 --project=. -e 'import Pkg; Pkg.test()'- passed.julia --project=benchmark -e '... benchmark_dense_tsp_constructor_fixture("tsp/cities=100", 100) ...'- passed; 10,000 variables, 1,980,000 quadratic terms, 0.887258424 seconds, 209,003,768 bytes allocated.Branch Hygiene
mainorigin/mainat089966eCloses #101