Skip to content

Split out the cold portion of bundles when we get fixed-constraint conflicts in cold code - #279

Merged
fitzgen merged 4 commits into
bytecodealliance:mainfrom
fitzgen:cold-split
Nov 17, 2026
Merged

fitzgen merged 4 commits into
bytecodealliance:mainfrom
fitzgen:cold-split

Conversation

@fitzgen

@fitzgen fitzgen commented Nov 16, 2026

Copy link
Copy Markdown
Member

See each commit for details. Benchmark results below.

tests/disas/component-model/compile-time-builtins-x64.wat

  • Instructions: 142 -> 126
  • Reloads: 20 -> 6
  • Spills: 3 -> 2
  • Reg-reg moves: 2 -> 1

Wasmtime's Compile-Time Builtins Criterion Benchmarks

increment-each-byte-in-buf/concurrency_support=true/compile-time-builtins-host-buf-api
                        time:   [656.86 µs 658.53 µs 660.09 µs]
                        change: [−17.026% −16.738% −16.453%] (p = 0.00 < 0.05)
                        Performance has improved.
Found 3 outliers among 100 measurements (3.00%)
  3 (3.00%) high mild

increment-random-byte-in-buf/concurrency_support=true/compile-time-builtins-host-buf-api
                        time:   [5.0167 ns 5.0317 ns 5.0495 ns]
                        change: [−14.065% −13.688% −13.332%] (p = 0.00 < 0.05)
                        Performance has improved.
Found 3 outliers among 100 measurements (3.00%)
  2 (2.00%) low mild
  1 (1.00%) high mild

Sightglass

This is instructions retired. Cycles was a lot noisier, even on a 200 iteration run, but generally looked similar enough.

TLDR:

  • Compilation geomean +0.29%
    • Improvements: shootout-switch −6.8%, tinygo-regex −0.3%
    • Regressions: gcc-loops +1.45%, hex-simd +1.48%, intgemm-simd +1.48%, rust-protobuf +1.44%
  • Execution geomean -0.16%
    • Improvements: ocaml-raytrace −2.1%, cm-online-stats −1.8%, rust-wasmprinter −0.6%, kotlin-richards −0.5%, libsodium-keygen −0.5%
    • Regressions: starlingmonkey-markdown +0.20%, dart-deltablue +0.05%
Details
compilation :: instructions-retired :: Geomean (29 benchmarks)

    baseline (-Cinlining=y) is 1.002x to 1.003x faster than cold-split (-Cinlining=y)!
    (confidence = 99%, df = 1425.8)

    ┌───────────────┬────────────┬───────────────────────────┐
    │ Geomean       │ Benchmarks │ Engine                    │
    ├───────────────┼────────────┼───────────────────────────┤
    │ 1459118211.53 │ 29         │ baseline (-Cinlining=y)   │
    ├───────────────┼────────────┼───────────────────────────┤
    │ 1463368398.40 │ 29         │ cold-split (-Cinlining=y) │
    └───────────────┴────────────┴───────────────────────────┘

execution :: instructions-retired :: Geomean (29 benchmarks)

    cold-split (-Cinlining=y) is 1.001x to 1.002x faster than baseline (-Cinlining=y)!
    (confidence = 99%, df = 411.0)

    ┌─────────────┬────────────┬───────────────────────────┐
    │ Geomean     │ Benchmarks │ Engine                    │
    ├─────────────┼────────────┼───────────────────────────┤
    │ 93409215.08 │ 29         │ baseline (-Cinlining=y)   │
    ├─────────────┼────────────┼───────────────────────────┤
    │ 93263394.53 │ 29         │ cold-split (-Cinlining=y) │
    └─────────────┴────────────┴───────────────────────────┘

compilation :: instructions-retired :: shootout-switch

    cold-split (-Cinlining=y) is 1.072x to 1.074x faster than baseline (-Cinlining=y)!
    (confidence = 99%, p < 0.0001)

    ┌────────────┬────────────┬───────────────┬───────────────┬────────┬───────────────────────────┐
    │ Min        │ Max        │ Mean          │ Median        │ Noise  │ Engine                    │
    ├────────────┼────────────┼───────────────┼───────────────┼────────┼───────────────────────────┤
    │ 1176078565 │ 1195512328 │ 1187318182.18 │ 1187868483.00 │ 0.493% │ baseline (-Cinlining=y)   │
    ├────────────┼────────────┼───────────────┼───────────────┼────────┼───────────────────────────┤
    │ 1095827151 │ 1118423448 │ 1106816424.47 │ 1107208044.00 │ 0.417% │ cold-split (-Cinlining=y) │
    └────────────┴────────────┴───────────────┴───────────────┴────────┴───────────────────────────┘

execution :: instructions-retired :: ocaml-raytrace

    cold-split (-Cinlining=y) is 1.02153x to 1.02154x faster than baseline (-Cinlining=y)!
    (confidence = 99%, p < 0.0001)

    ┌───────────┬───────────┬──────────────┬──────────────┬────────┬───────────────────────────┐
    │ Min       │ Max       │ Mean         │ Median       │ Noise  │ Engine                    │
    ├───────────┼───────────┼──────────────┼──────────────┼────────┼───────────────────────────┤
    │ 298009820 │ 298211089 │ 298027246.12 │ 298017278.00 │ 0.004% │ baseline (-Cinlining=y)   │
    ├───────────┼───────────┼──────────────┼──────────────┼────────┼───────────────────────────┤
    │ 291729072 │ 292173533 │ 291744851.65 │ 291736164.50 │ 0.004% │ cold-split (-Cinlining=y) │
    └───────────┴───────────┴──────────────┴──────────────┴────────┴───────────────────────────┘

execution :: instructions-retired :: cm-online-stats

    cold-split (-Cinlining=y) is 1.018334x to 1.018335x faster than baseline (-Cinlining=y)!
    (confidence = 99%, p < 0.0001)

    ┌───────────┬───────────┬──────────────┬──────────────┬────────┬───────────────────────────┐
    │ Min       │ Max       │ Mean         │ Median       │ Noise  │ Engine                    │
    ├───────────┼───────────┼──────────────┼──────────────┼────────┼───────────────────────────┤
    │ 124413341 │ 124432407 │ 124414769.11 │ 124414076.00 │ 0.001% │ baseline (-Cinlining=y)   │
    ├───────────┼───────────┼──────────────┼──────────────┼────────┼───────────────────────────┤
    │ 122173360 │ 122206929 │ 122175386.65 │ 122174110.00 │ 0.001% │ cold-split (-Cinlining=y) │
    └───────────┴───────────┴──────────────┴──────────────┴────────┴───────────────────────────┘

compilation :: instructions-retired :: intgemm-simd

    baseline (-Cinlining=y) is 1.01x to 1.02x faster than cold-split (-Cinlining=y)!
    (confidence = 99%, p < 0.0001)

    ┌────────────┬────────────┬───────────────┬───────────────┬────────┬───────────────────────────┐
    │ Min        │ Max        │ Mean          │ Median        │ Noise  │ Engine                    │
    ├────────────┼────────────┼───────────────┼───────────────┼────────┼───────────────────────────┤
    │ 6481582783 │ 6544360780 │ 6504349182.35 │ 6502550999.00 │ 0.196% │ baseline (-Cinlining=y)   │
    ├────────────┼────────────┼───────────────┼───────────────┼────────┼───────────────────────────┤
    │ 6573285698 │ 6644144547 │ 6600894311.52 │ 6599537512.50 │ 0.244% │ cold-split (-Cinlining=y) │
    └────────────┴────────────┴───────────────┴───────────────┴────────┴───────────────────────────┘

compilation :: instructions-retired :: hex-simd

    baseline (-Cinlining=y) is 1.01x to 1.02x faster than cold-split (-Cinlining=y)!
    (confidence = 99%, p < 0.0001)

    ┌────────────┬────────────┬───────────────┬───────────────┬────────┬───────────────────────────┐
    │ Min        │ Max        │ Mean          │ Median        │ Noise  │ Engine                    │
    ├────────────┼────────────┼───────────────┼───────────────┼────────┼───────────────────────────┤
    │ 2451120397 │ 2488522173 │ 2469326654.05 │ 2469167810.50 │ 0.304% │ baseline (-Cinlining=y)   │
    ├────────────┼────────────┼───────────────┼───────────────┼────────┼───────────────────────────┤
    │ 2487507231 │ 2523448684 │ 2505929405.39 │ 2505852697.00 │ 0.280% │ cold-split (-Cinlining=y) │
    └────────────┴────────────┴───────────────┴───────────────┴────────┴───────────────────────────┘

compilation :: instructions-retired :: gcc-loops

    baseline (-Cinlining=y) is 1.014x to 1.015x faster than cold-split (-Cinlining=y)!
    (confidence = 99%, p < 0.0001)

    ┌────────────┬────────────┬───────────────┬───────────────┬────────┬───────────────────────────┐
    │ Min        │ Max        │ Mean          │ Median        │ Noise  │ Engine                    │
    ├────────────┼────────────┼───────────────┼───────────────┼────────┼───────────────────────────┤
    │ 6466347740 │ 6529096860 │ 6491450445.03 │ 6489609686.00 │ 0.229% │ baseline (-Cinlining=y)   │
    ├────────────┼────────────┼───────────────┼───────────────┼────────┼───────────────────────────┤
    │ 6556814037 │ 6621405717 │ 6585259021.98 │ 6583921049.50 │ 0.224% │ cold-split (-Cinlining=y) │
    └────────────┴────────────┴───────────────┴───────────────┴────────┴───────────────────────────┘

compilation :: instructions-retired :: rust-protobuf

    baseline (-Cinlining=y) is 1.014x to 1.015x faster than cold-split (-Cinlining=y)!
    (confidence = 99%, p < 0.0001)

    ┌────────────┬────────────┬───────────────┬───────────────┬────────┬───────────────────────────┐
    │ Min        │ Max        │ Mean          │ Median        │ Noise  │ Engine                    │
    ├────────────┼────────────┼───────────────┼───────────────┼────────┼───────────────────────────┤
    │ 3589430030 │ 3632926077 │ 3606018456.11 │ 3604791505.00 │ 0.265% │ baseline (-Cinlining=y)   │
    ├────────────┼────────────┼───────────────┼───────────────┼────────┼───────────────────────────┤
    │ 3639206967 │ 3686087078 │ 3657846916.99 │ 3656652556.50 │ 0.282% │ cold-split (-Cinlining=y) │
    └────────────┴────────────┴───────────────┴───────────────┴────────┴───────────────────────────┘

compilation :: instructions-retired :: rust-json

    baseline (-Cinlining=y) is 1.011x to 1.012x faster than cold-split (-Cinlining=y)!
    (confidence = 99%, p < 0.0001)

    ┌────────────┬────────────┬───────────────┬───────────────┬────────┬───────────────────────────┐
    │ Min        │ Max        │ Mean          │ Median        │ Noise  │ Engine                    │
    ├────────────┼────────────┼───────────────┼───────────────┼────────┼───────────────────────────┤
    │ 4827957409 │ 4877485731 │ 4849252725.23 │ 4848336445.50 │ 0.242% │ baseline (-Cinlining=y)   │
    ├────────────┼────────────┼───────────────┼───────────────┼────────┼───────────────────────────┤
    │ 4880571858 │ 4937886178 │ 4905178791.63 │ 4904039728.00 │ 0.265% │ cold-split (-Cinlining=y) │
    └────────────┴────────────┴───────────────┴───────────────┴────────┴───────────────────────────┘

compilation :: instructions-retired :: rust-wasmprinter

    baseline (-Cinlining=y) is 1.011x to 1.012x faster than cold-split (-Cinlining=y)!
    (confidence = 99%, p < 0.0001)

    ┌─────────────┬─────────────┬────────────────┬────────────────┬────────┬───────────────────────────┐
    │ Min         │ Max         │ Mean           │ Median         │ Noise  │ Engine                    │
    ├─────────────┼─────────────┼────────────────┼────────────────┼────────┼───────────────────────────┤
    │ 16855564928 │ 17008303023 │ 16920635014.69 │ 16925405549.00 │ 0.263% │ baseline (-Cinlining=y)   │
    ├─────────────┼─────────────┼────────────────┼────────────────┼────────┼───────────────────────────┤
    │ 17037855967 │ 17177660299 │ 17111932640.15 │ 17115492523.00 │ 0.266% │ cold-split (-Cinlining=y) │
    └─────────────┴─────────────┴────────────────┴────────────────┴────────┴───────────────────────────┘

compilation :: instructions-retired :: dart-deltablue

    baseline (-Cinlining=y) is 1.010x to 1.011x faster than cold-split (-Cinlining=y)!
    (confidence = 99%, p < 0.0001)

    ┌────────────┬────────────┬───────────────┬───────────────┬────────┬───────────────────────────┐
    │ Min        │ Max        │ Mean          │ Median        │ Noise  │ Engine                    │
    ├────────────┼────────────┼───────────────┼───────────────┼────────┼───────────────────────────┤
    │ 1120332195 │ 1145500683 │ 1131414458.76 │ 1130966625.00 │ 0.470% │ baseline (-Cinlining=y)   │
    ├────────────┼────────────┼───────────────┼───────────────┼────────┼───────────────────────────┤
    │ 1133624542 │ 1157696705 │ 1143142141.02 │ 1142860644.50 │ 0.475% │ cold-split (-Cinlining=y) │
    └────────────┴────────────┴───────────────┴───────────────┴────────┴───────────────────────────┘

compilation :: instructions-retired :: cm-online-stats

    baseline (-Cinlining=y) is 1.00x to 1.02x faster than cold-split (-Cinlining=y)!
    (confidence = 99%, p = 0.0009)

    ┌───────────┬───────────┬──────────────┬──────────────┬────────┬───────────────────────────┐
    │ Min       │ Max       │ Mean         │ Median       │ Noise  │ Engine                    │
    ├───────────┼───────────┼──────────────┼──────────────┼────────┼───────────────────────────┤
    │ 116235387 │ 138788108 │ 125599751.11 │ 125121251.00 │ 4.186% │ baseline (-Cinlining=y)   │
    ├───────────┼───────────┼──────────────┼──────────────┼────────┼───────────────────────────┤
    │ 116892343 │ 138335391 │ 126821177.92 │ 126123845.00 │ 3.914% │ cold-split (-Cinlining=y) │
    └───────────┴───────────┴──────────────┴──────────────┴────────┴───────────────────────────┘

compilation :: instructions-retired :: hoot-earley-boyer

    baseline (-Cinlining=y) is 1.007x to 1.008x faster than cold-split (-Cinlining=y)!
    (confidence = 99%, p < 0.0001)

    ┌─────────────┬─────────────┬────────────────┬────────────────┬────────┬───────────────────────────┐
    │ Min         │ Max         │ Mean           │ Median         │ Noise  │ Engine                    │
    ├─────────────┼─────────────┼────────────────┼────────────────┼────────┼───────────────────────────┤
    │ 23035155395 │ 23235577410 │ 23129101758.81 │ 23137640735.00 │ 0.307% │ baseline (-Cinlining=y)   │
    ├─────────────┼─────────────┼────────────────┼────────────────┼────────┼───────────────────────────┤
    │ 23192315161 │ 23404452402 │ 23293220976.75 │ 23308739216.00 │ 0.364% │ cold-split (-Cinlining=y) │
    └─────────────┴─────────────┴────────────────┴────────────────┴────────┴───────────────────────────┘

compilation :: instructions-retired :: dotnet-raytracer

    baseline (-Cinlining=y) is 1.006x to 1.007x faster than cold-split (-Cinlining=y)!
    (confidence = 99%, p < 0.0001)

    ┌─────────────┬─────────────┬────────────────┬────────────────┬────────┬───────────────────────────┐
    │ Min         │ Max         │ Mean           │ Median         │ Noise  │ Engine                    │
    ├─────────────┼─────────────┼────────────────┼────────────────┼────────┼───────────────────────────┤
    │ 19310430031 │ 19504886192 │ 19387376053.93 │ 19394498604.50 │ 0.372% │ baseline (-Cinlining=y)   │
    ├─────────────┼─────────────┼────────────────┼────────────────┼────────┼───────────────────────────┤
    │ 19421359603 │ 19618911839 │ 19514766829.40 │ 19520389926.00 │ 0.306% │ cold-split (-Cinlining=y) │
    └─────────────┴─────────────┴────────────────┴────────────────┴────────┴───────────────────────────┘

execution :: instructions-retired :: rust-wasmprinter

    cold-split (-Cinlining=y) is 1.0062x to 1.0064x faster than baseline (-Cinlining=y)!
    (confidence = 99%, p < 0.0001)

    ┌───────────┬───────────┬──────────────┬──────────────┬────────┬───────────────────────────┐
    │ Min       │ Max       │ Mean         │ Median       │ Noise  │ Engine                    │
    ├───────────┼───────────┼──────────────┼──────────────┼────────┼───────────────────────────┤
    │ 106868103 │ 107296343 │ 106968688.47 │ 106917507.00 │ 0.159% │ baseline (-Cinlining=y)   │
    ├───────────┼───────────┼──────────────┼──────────────┼────────┼───────────────────────────┤
    │ 106193381 │ 106532190 │ 106301386.42 │ 106249820.00 │ 0.154% │ cold-split (-Cinlining=y) │
    └───────────┴───────────┴──────────────┴──────────────┴────────┴───────────────────────────┘

compilation :: instructions-retired :: ocaml-raytrace

    baseline (-Cinlining=y) is 1.005x to 1.007x faster than cold-split (-Cinlining=y)!
    (confidence = 99%, p < 0.0001)

    ┌────────────┬────────────┬───────────────┬───────────────┬────────┬───────────────────────────┐
    │ Min        │ Max        │ Mean          │ Median        │ Noise  │ Engine                    │
    ├────────────┼────────────┼───────────────┼───────────────┼────────┼───────────────────────────┤
    │ 2028817207 │ 2074467130 │ 2059332593.70 │ 2059995179.50 │ 0.306% │ baseline (-Cinlining=y)   │
    ├────────────┼────────────┼───────────────┼───────────────┼────────┼───────────────────────────┤
    │ 2049807272 │ 2085536153 │ 2071872752.93 │ 2072600648.50 │ 0.314% │ cold-split (-Cinlining=y) │
    └────────────┴────────────┴───────────────┴───────────────┴────────┴───────────────────────────┘

compilation :: instructions-retired :: kotlin-richards

    baseline (-Cinlining=y) is 1.00x to 1.01x faster than cold-split (-Cinlining=y)!
    (confidence = 99%, p < 0.0001)

    ┌────────────┬────────────┬───────────────┬───────────────┬────────┬───────────────────────────┐
    │ Min        │ Max        │ Mean          │ Median        │ Noise  │ Engine                    │
    ├────────────┼────────────┼───────────────┼───────────────┼────────┼───────────────────────────┤
    │ 1494605551 │ 1517962948 │ 1507146146.11 │ 1507132901.00 │ 0.341% │ baseline (-Cinlining=y)   │
    ├────────────┼────────────┼───────────────┼───────────────┼────────┼───────────────────────────┤
    │ 1505366787 │ 1529568627 │ 1515514647.95 │ 1515256414.00 │ 0.364% │ cold-split (-Cinlining=y) │
    └────────────┴────────────┴───────────────┴───────────────┴────────┴───────────────────────────┘

execution :: instructions-retired :: kotlin-richards

    cold-split (-Cinlining=y) is 1.00493x to 1.00494x faster than baseline (-Cinlining=y)!
    (confidence = 99%, p < 0.0001)

    ┌───────────┬───────────┬──────────────┬──────────────┬────────┬───────────────────────────┐
    │ Min       │ Max       │ Mean         │ Median       │ Noise  │ Engine                    │
    ├───────────┼───────────┼──────────────┼──────────────┼────────┼───────────────────────────┤
    │ 255172558 │ 255597307 │ 255180073.94 │ 255176201.50 │ 0.003% │ baseline (-Cinlining=y)   │
    ├───────────┼───────────┼──────────────┼──────────────┼────────┼───────────────────────────┤
    │ 253920652 │ 253954170 │ 253924581.40 │ 253922335.00 │ 0.001% │ cold-split (-Cinlining=y) │
    └───────────┴───────────┴──────────────┴──────────────┴────────┴───────────────────────────┘

compilation :: instructions-retired :: java-navier-stokes

    baseline (-Cinlining=y) is 1.00x to 1.01x faster than cold-split (-Cinlining=y)!
    (confidence = 99%, p < 0.0001)

    ┌───────────┬───────────┬──────────────┬──────────────┬────────┬───────────────────────────┐
    │ Min       │ Max       │ Mean         │ Median       │ Noise  │ Engine                    │
    ├───────────┼───────────┼──────────────┼──────────────┼────────┼───────────────────────────┤
    │ 619505235 │ 640543589 │ 630111869.08 │ 630210198.00 │ 0.649% │ baseline (-Cinlining=y)   │
    ├───────────┼───────────┼──────────────┼──────────────┼────────┼───────────────────────────┤
    │ 620386343 │ 646496527 │ 633227526.84 │ 633075699.50 │ 0.580% │ cold-split (-Cinlining=y) │
    └───────────┴───────────┴──────────────┴──────────────┴────────┴───────────────────────────┘

execution :: instructions-retired :: libsodium-keygen

    cold-split (-Cinlining=y) is 1.004x to 1.005x faster than baseline (-Cinlining=y)!
    (confidence = 99%, p < 0.0001)

    ┌──────────┬──────────┬─────────────┬─────────────┬────────┬───────────────────────────┐
    │ Min      │ Max      │ Mean        │ Median      │ Noise  │ Engine                    │
    ├──────────┼──────────┼─────────────┼─────────────┼────────┼───────────────────────────┤
    │ 59440207 │ 59609572 │ 59517722.03 │ 59518657.00 │ 0.063% │ baseline (-Cinlining=y)   │
    ├──────────┼──────────┼─────────────┼─────────────┼────────┼───────────────────────────┤
    │ 59181205 │ 59339780 │ 59246842.99 │ 59244699.00 │ 0.053% │ cold-split (-Cinlining=y) │
    └──────────┴──────────┴─────────────┴─────────────┴────────┴───────────────────────────┘

compilation :: instructions-retired :: shootout-heapsort

    baseline (-Cinlining=y) is 1.00x to 1.01x faster than cold-split (-Cinlining=y)!
    (confidence = 99%, p < 0.0001)

    ┌───────────┬───────────┬──────────────┬──────────────┬────────┬───────────────────────────┐
    │ Min       │ Max       │ Mean         │ Median       │ Noise  │ Engine                    │
    ├───────────┼───────────┼──────────────┼──────────────┼────────┼───────────────────────────┤
    │ 315893824 │ 329528576 │ 323115656.86 │ 323198847.00 │ 1.000% │ baseline (-Cinlining=y)   │
    ├───────────┼───────────┼──────────────┼──────────────┼────────┼───────────────────────────┤
    │ 315651374 │ 330630963 │ 324476565.20 │ 324372716.00 │ 1.054% │ cold-split (-Cinlining=y) │
    └───────────┴───────────┴──────────────┴──────────────┴────────┴───────────────────────────┘

compilation :: instructions-retired :: shootout-memmove

    baseline (-Cinlining=y) is 1.00x to 1.01x faster than cold-split (-Cinlining=y)!
    (confidence = 99%, p = 0.0001)

    ┌───────────┬───────────┬──────────────┬──────────────┬────────┬───────────────────────────┐
    │ Min       │ Max       │ Mean         │ Median       │ Noise  │ Engine                    │
    ├───────────┼───────────┼──────────────┼──────────────┼────────┼───────────────────────────┤
    │ 462967101 │ 481750827 │ 471349298.87 │ 471151283.50 │ 1.098% │ baseline (-Cinlining=y)   │
    ├───────────┼───────────┼──────────────┼──────────────┼────────┼───────────────────────────┤
    │ 462128123 │ 483874012 │ 472879262.81 │ 473076187.00 │ 1.153% │ cold-split (-Cinlining=y) │
    └───────────┴───────────┴──────────────┴──────────────┴────────┴───────────────────────────┘

compilation :: instructions-retired :: shootout-sieve

    baseline (-Cinlining=y) is 1.00x to 1.01x faster than cold-split (-Cinlining=y)!
    (confidence = 99%, p = 0.0002)

    ┌───────────┬───────────┬──────────────┬──────────────┬────────┬───────────────────────────┐
    │ Min       │ Max       │ Mean         │ Median       │ Noise  │ Engine                    │
    ├───────────┼───────────┼──────────────┼──────────────┼────────┼───────────────────────────┤
    │ 463560372 │ 482104226 │ 472878353.59 │ 473105046.00 │ 1.209% │ baseline (-Cinlining=y)   │
    ├───────────┼───────────┼──────────────┼──────────────┼────────┼───────────────────────────┤
    │ 464069844 │ 488835954 │ 474589415.87 │ 474303797.00 │ 1.006% │ cold-split (-Cinlining=y) │
    └───────────┴───────────┴──────────────┴──────────────┴────────┴───────────────────────────┘

compilation :: instructions-retired :: shootout-keccak

    baseline (-Cinlining=y) is 1.002x to 1.005x faster than cold-split (-Cinlining=y)!
    (confidence = 99%, p < 0.0001)

    ┌───────────┬───────────┬──────────────┬──────────────┬────────┬───────────────────────────┐
    │ Min       │ Max       │ Mean         │ Median       │ Noise  │ Engine                    │
    ├───────────┼───────────┼──────────────┼──────────────┼────────┼───────────────────────────┤
    │ 505582101 │ 518780471 │ 512871690.75 │ 512780410.00 │ 0.669% │ baseline (-Cinlining=y)   │
    ├───────────┼───────────┼──────────────┼──────────────┼────────┼───────────────────────────┤
    │ 507597070 │ 520639908 │ 514570129.38 │ 514470041.50 │ 0.668% │ cold-split (-Cinlining=y) │
    └───────────┴───────────┴──────────────┴──────────────┴────────┴───────────────────────────┘

compilation :: instructions-retired :: shootout-xchacha20

    baseline (-Cinlining=y) is 1.00x to 1.01x faster than cold-split (-Cinlining=y)!
    (confidence = 99%, p < 0.0001)

    ┌───────────┬───────────┬──────────────┬──────────────┬────────┬───────────────────────────┐
    │ Min       │ Max       │ Mean         │ Median       │ Noise  │ Engine                    │
    ├───────────┼───────────┼──────────────┼──────────────┼────────┼───────────────────────────┤
    │ 463480565 │ 483954990 │ 474678816.53 │ 474292698.00 │ 0.970% │ baseline (-Cinlining=y)   │
    ├───────────┼───────────┼──────────────┼──────────────┼────────┼───────────────────────────┤
    │ 467590115 │ 485486045 │ 476255533.54 │ 475919523.00 │ 1.086% │ cold-split (-Cinlining=y) │
    └───────────┴───────────┴──────────────┴──────────────┴────────┴───────────────────────────┘

compilation :: instructions-retired :: richards

    baseline (-Cinlining=y) is 1.00x to 1.01x faster than cold-split (-Cinlining=y)!
    (confidence = 99%, p = 0.0003)

    ┌───────────┬───────────┬──────────────┬──────────────┬────────┬───────────────────────────┐
    │ Min       │ Max       │ Mean         │ Median       │ Noise  │ Engine                    │
    ├───────────┼───────────┼──────────────┼──────────────┼────────┼───────────────────────────┤
    │ 328718187 │ 343641851 │ 336826916.96 │ 337042363.00 │ 0.989% │ baseline (-Cinlining=y)   │
    ├───────────┼───────────┼──────────────┼──────────────┼────────┼───────────────────────────┤
    │ 330630012 │ 346154988 │ 337975208.68 │ 337860681.00 │ 1.008% │ cold-split (-Cinlining=y) │
    └───────────┴───────────┴──────────────┴──────────────┴────────┴───────────────────────────┘

compilation :: instructions-retired :: starlingmonkey-markdown

    baseline (-Cinlining=y) is 1.0027x to 1.0032x faster than cold-split (-Cinlining=y)!
    (confidence = 99%, p < 0.0001)

    ┌──────────────┬──────────────┬─────────────────┬─────────────────┬────────┬───────────────────────────┐
    │ Min          │ Max          │ Mean            │ Median          │ Noise  │ Engine                    │
    ├──────────────┼──────────────┼─────────────────┼─────────────────┼────────┼───────────────────────────┤
    │ 154508091941 │ 155436014990 │ 155103616512.30 │ 155197987351.50 │ 0.138% │ baseline (-Cinlining=y)   │
    ├──────────────┼──────────────┼─────────────────┼─────────────────┼────────┼───────────────────────────┤
    │ 154935761973 │ 156021535735 │ 155574175293.52 │ 155639154521.50 │ 0.111% │ cold-split (-Cinlining=y) │
    └──────────────┴──────────────┴─────────────────┴─────────────────┴────────┴───────────────────────────┘

compilation :: instructions-retired :: tinygo-regex

    cold-split (-Cinlining=y) is 1.002x to 1.003x faster than baseline (-Cinlining=y)!
    (confidence = 99%, p < 0.0001)

    ┌────────────┬────────────┬───────────────┬───────────────┬────────┬───────────────────────────┐
    │ Min        │ Max        │ Mean          │ Median        │ Noise  │ Engine                    │
    ├────────────┼────────────┼───────────────┼───────────────┼────────┼───────────────────────────┤
    │ 5300695124 │ 5349483641 │ 5323116425.14 │ 5322634196.00 │ 0.214% │ baseline (-Cinlining=y)   │
    ├────────────┼────────────┼───────────────┼───────────────┼────────┼───────────────────────────┤
    │ 5290200997 │ 5343604018 │ 5308155768.35 │ 5306322278.00 │ 0.234% │ cold-split (-Cinlining=y) │
    └────────────┴────────────┴───────────────┴───────────────┴────────┴───────────────────────────┘

execution :: instructions-retired :: starlingmonkey-markdown

    baseline (-Cinlining=y) is 1.0016x to 1.0021x faster than cold-split (-Cinlining=y)!
    (confidence = 99%, p < 0.0001)

    ┌──────────┬──────────┬─────────────┬─────────────┬────────┬───────────────────────────┐
    │ Min      │ Max      │ Mean        │ Median      │ Noise  │ Engine                    │
    ├──────────┼──────────┼─────────────┼─────────────┼────────┼───────────────────────────┤
    │ 34522074 │ 35331004 │ 34591186.91 │ 34584632.50 │ 0.095% │ baseline (-Cinlining=y)   │
    ├──────────┼──────────┼─────────────┼─────────────┼────────┼───────────────────────────┤
    │ 34583337 │ 35440186 │ 34658906.52 │ 34645921.00 │ 0.110% │ cold-split (-Cinlining=y) │
    └──────────┴──────────┴─────────────┴─────────────┴────────┴───────────────────────────┘

execution :: instructions-retired :: dotnet-raytracer

    cold-split (-Cinlining=y) is 1.0008x to 1.0014x faster than baseline (-Cinlining=y)!
    (confidence = 99%, p < 0.0001)

    ┌───────────┬───────────┬──────────────┬──────────────┬────────┬───────────────────────────┐
    │ Min       │ Max       │ Mean         │ Median       │ Noise  │ Engine                    │
    ├───────────┼───────────┼──────────────┼──────────────┼────────┼───────────────────────────┤
    │ 181355444 │ 182205657 │ 181678892.88 │ 181619232.00 │ 0.184% │ baseline (-Cinlining=y)   │
    ├───────────┼───────────┼──────────────┼──────────────┼────────┼───────────────────────────┤
    │ 181240683 │ 183351484 │ 181479840.85 │ 181521164.00 │ 0.140% │ cold-split (-Cinlining=y) │
    └───────────┴───────────┴──────────────┴──────────────┴────────┴───────────────────────────┘

compilation :: instructions-retired :: hashset

    baseline (-Cinlining=y) is 1.000x to 1.001x faster than cold-split (-Cinlining=y)!
    (confidence = 99%, p = 0.0087)

    ┌────────────┬────────────┬───────────────┬───────────────┬────────┬───────────────────────────┐
    │ Min        │ Max        │ Mean          │ Median        │ Noise  │ Engine                    │
    ├────────────┼────────────┼───────────────┼───────────────┼────────┼───────────────────────────┤
    │ 1806522542 │ 1830844588 │ 1816591905.83 │ 1816368408.50 │ 0.305% │ baseline (-Cinlining=y)   │
    ├────────────┼────────────┼───────────────┼───────────────┼────────┼───────────────────────────┤
    │ 1807092458 │ 1832239788 │ 1817891410.07 │ 1817744027.00 │ 0.368% │ cold-split (-Cinlining=y) │
    └────────────┴────────────┴───────────────┴───────────────┴────────┴───────────────────────────┘

execution :: instructions-retired :: hoot-earley-boyer

    cold-split (-Cinlining=y) is 1.0006x to 1.0007x faster than baseline (-Cinlining=y)!
    (confidence = 99%, p < 0.0001)

    ┌───────────┬───────────┬──────────────┬──────────────┬────────┬───────────────────────────┐
    │ Min       │ Max       │ Mean         │ Median       │ Noise  │ Engine                    │
    ├───────────┼───────────┼──────────────┼──────────────┼────────┼───────────────────────────┤
    │ 751946221 │ 753817100 │ 752356137.92 │ 752384971.00 │ 0.064% │ baseline (-Cinlining=y)   │
    ├───────────┼───────────┼──────────────┼──────────────┼────────┼───────────────────────────┤
    │ 751478615 │ 753526800 │ 751887018.46 │ 751908095.00 │ 0.065% │ cold-split (-Cinlining=y) │
    └───────────┴───────────┴──────────────┴──────────────┴────────┴───────────────────────────┘

execution :: instructions-retired :: dart-deltablue

    baseline (-Cinlining=y) is 1.00054x to 1.00055x faster than cold-split (-Cinlining=y)!
    (confidence = 99%, p < 0.0001)

    ┌───────────┬───────────┬──────────────┬──────────────┬────────┬───────────────────────────┐
    │ Min       │ Max       │ Mean         │ Median       │ Noise  │ Engine                    │
    ├───────────┼───────────┼──────────────┼──────────────┼────────┼───────────────────────────┤
    │ 453042896 │ 453144346 │ 453052933.31 │ 453049097.00 │ 0.002% │ baseline (-Cinlining=y)   │
    ├───────────┼───────────┼──────────────┼──────────────┼────────┼───────────────────────────┤
    │ 453289218 │ 453347795 │ 453298401.99 │ 453295208.00 │ 0.001% │ cold-split (-Cinlining=y) │
    └───────────┴───────────┴──────────────┴──────────────┴────────┴───────────────────────────┘

execution :: instructions-retired :: splay

    cold-split (-Cinlining=y) is 1.0003x to 1.0004x faster than baseline (-Cinlining=y)!
    (confidence = 99%, p < 0.0001)

    ┌────────────┬────────────┬───────────────┬───────────────┬────────┬───────────────────────────┐
    │ Min        │ Max        │ Mean          │ Median        │ Noise  │ Engine                    │
    ├────────────┼────────────┼───────────────┼───────────────┼────────┼───────────────────────────┤
    │ 1192813017 │ 1222523508 │ 1194968273.40 │ 1193062560.50 │ 0.037% │ baseline (-Cinlining=y)   │
    ├────────────┼────────────┼───────────────┼───────────────┼────────┼───────────────────────────┤
    │ 1192355657 │ 1209844291 │ 1194469962.57 │ 1192578947.50 │ 0.042% │ cold-split (-Cinlining=y) │
    └────────────┴────────────┴───────────────┴───────────────┴────────┴───────────────────────────┘

execution :: instructions-retired :: intgemm-simd

    cold-split (-Cinlining=y) is 1.0001x to 1.0004x faster than baseline (-Cinlining=y)!
    (confidence = 99%, p = 0.0013)

    ┌──────────┬──────────┬─────────────┬─────────────┬────────┬───────────────────────────┐
    │ Min      │ Max      │ Mean        │ Median      │ Noise  │ Engine                    │
    ├──────────┼──────────┼─────────────┼─────────────┼────────┼───────────────────────────┤
    │ 45331350 │ 45592265 │ 45401533.87 │ 45375134.50 │ 0.149% │ baseline (-Cinlining=y)   │
    ├──────────┼──────────┼─────────────┼─────────────┼────────┼───────────────────────────┤
    │ 45316354 │ 45621913 │ 45394817.62 │ 45363627.00 │ 0.190% │ cold-split (-Cinlining=y) │
    └──────────┴──────────┴─────────────┴─────────────┴────────┴───────────────────────────┘

execution :: instructions-retired :: gcc-loops

    baseline (-Cinlining=y) is 1.00017x to 1.00018x faster than cold-split (-Cinlining=y)!
    (confidence = 99%, p < 0.0001)

    ┌──────────┬──────────┬─────────────┬─────────────┬────────┬───────────────────────────┐
    │ Min      │ Max      │ Mean        │ Median      │ Noise  │ Engine                    │
    ├──────────┼──────────┼─────────────┼─────────────┼────────┼───────────────────────────┤
    │ 70051573 │ 70220612 │ 70058595.92 │ 70052292.50 │ 0.001% │ baseline (-Cinlining=y)   │
    ├──────────┼──────────┼─────────────┼─────────────┼────────┼───────────────────────────┤
    │ 70063716 │ 70229474 │ 70066979.39 │ 70064607.00 │ 0.001% │ cold-split (-Cinlining=y) │
    └──────────┴──────────┴─────────────┴─────────────┴────────┴───────────────────────────┘

@fitzgen
fitzgen requested a review from cfallin November 16, 2026 16:47

@cfallin cfallin left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Idea below re: by-construction ensuring this invariant (rather than splitting after the fact) might help the compilation time impact -- curious what you think given all your experimentation. Happy to consider this approach still if it doesn't work.

Comment thread src/cfg.rs Resolved
Comment thread src/ion/process.rs Resolved
Comment thread src/ion/process.rs Resolved

@cfallin cfallin left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, this version looks good -- happy to merge once the merge conflict is resolved and once the dense/sparse (vec/hashset) question on cold_blocks is tested. Thanks!

… code

We do not count this towards the bundle's attempts since a bundle can only be
split into hot and cold portions once, and each new sub-bundle is homogenous
forever after.
@fitzgen
fitzgen enabled auto-merge (squash) November 17, 2026 18:43
fitzgen added a commit to fitzgen/wasmtime that referenced this pull request Nov 17, 2026
…ytecodealliance#15329)

They already inherited coldness from their successor, but this commit makes them
also inherit it from their predecessor. If either is cold, then that implies
that the critical-edge block is also cold.

This improves code quality by better falling though hot paths and better
register allocation after bytecodealliance/regalloc2#279
lands.
@fitzgen
fitzgen merged commit 5f6d75e into bytecodealliance:main Nov 17, 2026
6 checks passed
@fitzgen
fitzgen deleted the cold-split branch November 17, 2026 19:26
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.

2 participants