Skip to content

EGraph hash map optimizations#21

Merged
jonathanvdc merged 6 commits intomainfrom
hash-map-optimizations
Nov 9, 2025
Merged

EGraph hash map optimizations#21
jonathanvdc merged 6 commits intomainfrom
hash-map-optimizations

Conversation

@jonathanvdc
Copy link
Owner

No description provided.

@github-actions
Copy link

github-actions bot commented Nov 9, 2025

JMH comparison (baseline vs PR)

Benchmark Params Baseline PR Δ (PR/Base) Unit
IncrementalBenchmarks.incrementalPolynomial depth=6, mutableEGraph=false, size=500, threadCount=1 195.915 194.02 0.990× (-1.0%) ms/op
IncrementalBenchmarks.incrementalPolynomial depth=6, mutableEGraph=false, size=500, threadCount=2 314.877 297.897 0.946× (-5.4%) ms/op
IncrementalBenchmarks.incrementalPolynomial depth=6, mutableEGraph=true, size=500, threadCount=1 7.84266 8.22159 1.048× (+4.8%) ms/op
IncrementalBenchmarks.incrementalPolynomial depth=6, mutableEGraph=true, size=500, threadCount=2 72.2722 72.8113 1.007× (+0.7%) ms/op
IncrementalBenchmarks.oneByOnePolynomial depth=6, mutableEGraph=false, size=500, threadCount=1 347.304 325.479 0.937× (-6.3%) ms/op
IncrementalBenchmarks.oneByOnePolynomial depth=6, mutableEGraph=false, size=500, threadCount=2 506.175 506.636 1.001× (+0.1%) ms/op
IncrementalBenchmarks.oneByOnePolynomial depth=6, mutableEGraph=true, size=500, threadCount=1 138.269 138.692 1.003× (+0.3%) ms/op
IncrementalBenchmarks.oneByOnePolynomial depth=6, mutableEGraph=true, size=500, threadCount=2 303.459 296 0.975× (-2.5%) ms/op
LiarBenchmarks.findGemmInMm threadCount=1 230.015 223.56 0.972× (-2.8%) ms/op
LiarBenchmarks.findGemmInMm threadCount=2 182.511 173.656 0.951× (-4.9%) ms/op
LiarBenchmarks.findGemvInMv threadCount=1 60.7702 61.8665 1.018× (+1.8%) ms/op
LiarBenchmarks.findGemvInMv threadCount=2 55.1882 56.5584 1.025× (+2.5%) ms/op
MatmulBenchmarks.nmm mutableEGraph=false, size=20, threadCount=1 4.45602 4.48606 1.007× (+0.7%) ms/op
MatmulBenchmarks.nmm mutableEGraph=false, size=20, threadCount=2 4.28422 4.20038 0.980× (-2.0%) ms/op
MatmulBenchmarks.nmm mutableEGraph=false, size=40, threadCount=1 30.1247 29.9196 0.993× (-0.7%) ms/op
MatmulBenchmarks.nmm mutableEGraph=false, size=40, threadCount=2 23.5948 23.7014 1.005× (+0.5%) ms/op
MatmulBenchmarks.nmm mutableEGraph=false, size=80, threadCount=1 267.391 261.32 0.977× (-2.3%) ms/op
MatmulBenchmarks.nmm mutableEGraph=false, size=80, threadCount=2 176.012 157.814 0.897× (-10.3%) ms/op
MatmulBenchmarks.nmm mutableEGraph=true, size=20, threadCount=1 2.721 2.7593 1.014× (+1.4%) ms/op
MatmulBenchmarks.nmm mutableEGraph=true, size=20, threadCount=2 2.55217 2.6941 1.056× (+5.6%) ms/op
MatmulBenchmarks.nmm mutableEGraph=true, size=40, threadCount=1 20.4907 20.678 1.009× (+0.9%) ms/op
MatmulBenchmarks.nmm mutableEGraph=true, size=40, threadCount=2 15.2617 15.5157 1.017× (+1.7%) ms/op
MatmulBenchmarks.nmm mutableEGraph=true, size=80, threadCount=1 176.152 168.795 0.958× (-4.2%) ms/op
MatmulBenchmarks.nmm mutableEGraph=true, size=80, threadCount=2 111.13 107.605 0.968× (-3.2%) ms/op
PolyBenchmarks.polynomial mutableEGraph=false, size=5, threadCount=1 87.1344 86.1413 0.989× (-1.1%) ms/op
PolyBenchmarks.polynomial mutableEGraph=false, size=5, threadCount=2 80.3963 79.6796 0.991× (-0.9%) ms/op
PolyBenchmarks.polynomial mutableEGraph=false, size=6, threadCount=1 408.011 403.221 0.988× (-1.2%) ms/op
PolyBenchmarks.polynomial mutableEGraph=false, size=6, threadCount=2 367.177 356.347 0.971× (-2.9%) ms/op
PolyBenchmarks.polynomial mutableEGraph=true, size=5, threadCount=1 34.2072 34.2745 1.002× (+0.2%) ms/op
PolyBenchmarks.polynomial mutableEGraph=true, size=5, threadCount=2 28.7418 28.2641 0.983× (-1.7%) ms/op
PolyBenchmarks.polynomial mutableEGraph=true, size=6, threadCount=1 139.329 141.9 1.018× (+1.8%) ms/op
PolyBenchmarks.polynomial mutableEGraph=true, size=6, threadCount=2 113.261 113.056 0.998× (-0.2%) ms/op
VectorBenchmarks.blinnPhong mutableEGraph=false, threadCount=1 34807.5 33992.6 0.977× (-2.3%) ms/op
VectorBenchmarks.blinnPhong mutableEGraph=false, threadCount=2 33044.5 32788.2 0.992× (-0.8%) ms/op
VectorBenchmarks.blinnPhong mutableEGraph=true, threadCount=1 4544.92 4415.7 0.972× (-2.8%) ms/op
VectorBenchmarks.blinnPhong mutableEGraph=true, threadCount=2 3293.88 3111.63 0.945× (-5.5%) ms/op
VectorBenchmarks.gramSchmidt mutableEGraph=false, threadCount=1 467.809 475.573 1.017× (+1.7%) ms/op
VectorBenchmarks.gramSchmidt mutableEGraph=false, threadCount=2 397.789 387.364 0.974× (-2.6%) ms/op
VectorBenchmarks.gramSchmidt mutableEGraph=true, threadCount=1 170.632 179.746 1.053× (+5.3%) ms/op
VectorBenchmarks.gramSchmidt mutableEGraph=true, threadCount=2 128.363 131.879 1.027× (+2.7%) ms/op
VectorBenchmarks.reflection mutableEGraph=false, threadCount=1 292.259 293.892 1.006× (+0.6%) ms/op
VectorBenchmarks.reflection mutableEGraph=false, threadCount=2 247.956 239.184 0.965× (-3.5%) ms/op
VectorBenchmarks.reflection mutableEGraph=true, threadCount=1 120.079 115.464 0.962× (-3.8%) ms/op
VectorBenchmarks.reflection mutableEGraph=true, threadCount=2 85.8107 83.7479 0.976× (-2.4%) ms/op
VectorBenchmarks.vectorNormalization mutableEGraph=false, threadCount=1 3.90033 3.73062 0.956× (-4.4%) ms/op
VectorBenchmarks.vectorNormalization mutableEGraph=false, threadCount=2 4.26656 4.28576 1.004× (+0.4%) ms/op
VectorBenchmarks.vectorNormalization mutableEGraph=true, threadCount=1 1.6568 1.67698 1.012× (+1.2%) ms/op
VectorBenchmarks.vectorNormalization mutableEGraph=true, threadCount=2 2.15059 2.30263 1.071× (+7.1%) ms/op
Geomean threadCount=1, mutableEGraph=false 0.986× (-1.4%)
Geomean threadCount=1, mutableEGraph=true 1.004× (+0.4%)
Geomean threadCount=2, mutableEGraph=false 0.977× (-2.3%)
Geomean threadCount=2, mutableEGraph=true 1.001× (+0.1%)

Note: < 1.0× means faster on PR; > 1.0× means slower.

@jonathanvdc jonathanvdc merged commit c0872ab into main Nov 9, 2025
2 checks passed
@jonathanvdc jonathanvdc deleted the hash-map-optimizations branch November 9, 2025 15:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant