Merged
Conversation
Member
Author
Benchmark full coloringusing SparseArrays, SparseMatrixColorings
using Chairmarks, StableRNGs
for n in (1000, 3000), p in (0.0003, 0.001, 0.003, 0.01)
As = [sprand(StableRNG(i), Bool, n, n, p) for i in 1:10]
problem = ColoringProblem()
algo = GreedyColoringAlgorithm(DynamicLargestFirst())
bench = @b fast_coloring.($As, $(Ref(problem)), $(Ref(algo))) seconds = 3
@info "Benchmark: n=$n, p=$p"
display(bench)
endThis branch: [ Info: Benchmark: n=1000, p=0.0003
393.125 μs (362 allocs: 588.125 KiB)
[ Info: Benchmark: n=1000, p=0.001
656.292 μs (362 allocs: 645.938 KiB)
[ Info: Benchmark: n=1000, p=0.003
3.128 ms (362 allocs: 808.422 KiB)
[ Info: Benchmark: n=1000, p=0.01
19.676 ms (362 allocs: 1.362 MiB)
[ Info: Benchmark: n=3000, p=0.0003
2.776 ms (362 allocs: 1.834 MiB)
[ Info: Benchmark: n=3000, p=0.001
11.834 ms (362 allocs: 2.321 MiB)
[ Info: Benchmark: n=3000, p=0.003
55.021 ms (362 allocs: 3.726 MiB)
[ Info: Benchmark: n=3000, p=0.01
435.350 ms (392 allocs: 8.782 MiB)Main branch: [ Info: Benchmark: n=1000, p=0.0003
622.584 μs (583 allocs: 968.344 KiB)
[ Info: Benchmark: n=1000, p=0.001
1.244 ms (777 allocs: 996.750 KiB)
[ Info: Benchmark: n=1000, p=0.003
4.543 ms (1526 allocs: 1.380 MiB)
[ Info: Benchmark: n=1000, p=0.01
31.623 ms (5934 allocs: 2.639 MiB)
[ Info: Benchmark: n=3000, p=0.0003
4.389 ms (909 allocs: 2.717 MiB)
[ Info: Benchmark: n=3000, p=0.001
16.675 ms (1939 allocs: 3.789 MiB)
[ Info: Benchmark: n=3000, p=0.003
86.568 ms (6665 allocs: 6.467 MiB)
[ Info: Benchmark: n=3000, p=0.01
741.368 ms (34668 allocs: 14.959 MiB)Benchmark just orderingusing SparseArrays, SparseMatrixColorings
using Chairmarks, StableRNGs
for n in (1000, 3000), p in (0.0003, 0.001, 0.003, 0.01)
As = [sprand(StableRNG(i), Bool, n, n, p) for i in 1:10]
gs = SparseMatrixColorings.BipartiteGraph.(As)
order = DynamicLargestFirst()
bench = @b SparseMatrixColorings.vertices.($gs, $(Ref(Val(2))), $(Ref(order))) seconds =
3
@info "Benchmark: n=$n, p=$p"
display(bench)
endThis branch: [ Info: Benchmark: n=1000, p=0.0003
321.125 μs (242 allocs: 324.875 KiB)
[ Info: Benchmark: n=1000, p=0.001
491.416 μs (242 allocs: 326.562 KiB)
[ Info: Benchmark: n=1000, p=0.003
2.114 ms (242 allocs: 332.422 KiB)
[ Info: Benchmark: n=1000, p=0.01
14.323 ms (242 allocs: 372.922 KiB)
[ Info: Benchmark: n=3000, p=0.0003
2.185 ms (242 allocs: 956.203 KiB)
[ Info: Benchmark: n=3000, p=0.001
8.269 ms (242 allocs: 963.234 KiB)
[ Info: Benchmark: n=3000, p=0.003
39.502 ms (242 allocs: 1001.156 KiB)
[ Info: Benchmark: n=3000, p=0.01
327.865 ms (272 allocs: 1.218 MiB)Main branch: [ Info: Benchmark: n=1000, p=0.0003
559.833 μs (463 allocs: 705.094 KiB)
[ Info: Benchmark: n=1000, p=0.001
1.090 ms (657 allocs: 677.375 KiB)
[ Info: Benchmark: n=1000, p=0.003
3.524 ms (1406 allocs: 936.641 KiB)
[ Info: Benchmark: n=1000, p=0.01
26.086 ms (5814 allocs: 1.640 MiB)
[ Info: Benchmark: n=3000, p=0.0003
3.841 ms (789 allocs: 1.817 MiB)
[ Info: Benchmark: n=3000, p=0.001
12.936 ms (1819 allocs: 2.409 MiB)
[ Info: Benchmark: n=3000, p=0.003
70.679 ms (6545 allocs: 3.718 MiB)
[ Info: Benchmark: n=3000, p=0.01
635.092 ms (34548 allocs: 7.395 MiB) |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #220 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 15 15
Lines 1642 1680 +38
=========================================
+ Hits 1642 1680 +38 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
amontoison
approved these changes
Mar 31, 2025
Collaborator
|
All tests passed and you have good results in the benchmarks. |
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.
Uh oh!
There was an error while loading. Please reload this page.