Micro-benchmarks

Criterion measurements of Spindle alone, per commit — the algorithmic layer, measured inside the library. For the four-way comparison against Synapse, Continuwuity and Tuwunel, including every loss and its investigation, see Spindle vs the field.

37measurements
3comparisons

Commit 63c8c30001bf on main · 2026-09-02T21:47:40Z · runner github-actions/ubuntu-24.04

Generated from Criterion output on every push to main. Ratios are the result; wall times are context. Absolute times do not survive a change of runner, and a shared CI runner is both slower and noisier than a workstation by an amount that varies run to run. Everything here is algorithmic, measured inside the library — none of it is a server throughput figure and none of it should be quoted as one.

Fork resolution vs ruma-state-res

SizeSpindleComparisonRatio
19.93 µs18 µs1.81x
423.3 µs59.8 µs2.57x
16104 µs245 µs2.36x
64539 µs961 µs1.78x
2562.45 ms4.15 ms1.69x

State lookup: our HAMT vs HashMap

SizeSpindleComparisonRatio
1000168 ns24.4 ns6.87x slower
50000185 ns26.3 ns7.03x slower

Every measurement

All benchmarks in this run
BenchmarkMeanMedian95% CI
delayed_firing_tick/1001.73 ms1.73 ms1.69 ms – 1.77 ms
delayed_firing_tick/10003.59 ms3.61 ms3.53 ms – 3.65 ms
delayed_firing_tick/1000026 ms25.1 ms24.7 ms – 27.4 ms
delayed_idle_tick/100587 ns586 ns586 ns – 589 ns
delayed_idle_tick/1000607 ns606 ns606 ns – 609 ns
delayed_idle_tick/10000669 ns667 ns667 ns – 671 ns
delayed_restart/101.44 µs1.43 µs1.43 µs – 1.44 µs
delayed_restart/1001.59 µs1.58 µs1.58 µs – 1.59 µs
delayed_restart/10001.89 µs1.89 µs1.89 µs – 1.9 µs
fork resolution/ruma-state-res/118 µs17.9 µs17.9 µs – 18.1 µs
fork resolution/ruma-state-res/16245 µs245 µs245 µs – 246 µs
fork resolution/ruma-state-res/2564.15 ms4.14 ms4.14 ms – 4.15 ms
fork resolution/ruma-state-res/459.8 µs59.6 µs59.6 µs – 60 µs
fork resolution/ruma-state-res/64961 µs960 µs960 µs – 962 µs
fork resolution/spindle window merge/19.93 µs9.69 µs9.84 µs – 10 µs
fork resolution/spindle window merge/16104 µs102 µs103 µs – 105 µs
fork resolution/spindle window merge/2562.45 ms2.44 ms2.44 ms – 2.46 ms
fork resolution/spindle window merge/423.3 µs23 µs23.1 µs – 23.5 µs
fork resolution/spindle window merge/64539 µs541 µs534 µs – 544 µs
fork_window_two_event_fork/bounded/100404 ns403 ns403 ns – 405 ns
fork_window_two_event_fork/bounded/1000453 ns451 ns451 ns – 455 ns
fork_window_two_event_fork/bounded/10000455 ns453 ns453 ns – 457 ns
fork_window_two_event_fork/exhaustive/10022.7 µs22.6 µs22.6 µs – 22.8 µs
fork_window_two_event_fork/exhaustive/1000292 µs290 µs291 µs – 294 µs
fork_window_two_event_fork/exhaustive/100003.6 ms3.6 ms3.6 ms – 3.61 ms
state_lookup/hamt/1000168 ns168 ns168 ns – 168 ns
state_lookup/hamt/50000185 ns185 ns184 ns – 185 ns
state_lookup/hashmap/100024.4 ns24.4 ns24.4 ns – 24.5 ns
state_lookup/hashmap/5000026.3 ns26.2 ns26.2 ns – 26.3 ns
state_retained_updates/clone_per_event/100453 µs452 µs452 µs – 454 µs
state_retained_updates/clone_per_event/100054.3 ms53.5 ms52.8 ms – 56 ms
state_retained_updates/hamt/100246 µs246 µs246 µs – 247 µs
state_retained_updates/hamt/10003.88 ms3.87 ms3.88 ms – 3.89 ms
state_retained_updates/hamt/1000062.3 ms62.2 ms62.2 ms – 62.5 ms
state_retained_updates/imbl/100148 µs148 µs148 µs – 149 µs
state_retained_updates/imbl/10001.76 ms1.76 ms1.76 ms – 1.77 ms
state_retained_updates/imbl/1000037.9 ms38 ms37.7 ms – 38.1 ms

Raw data: latest.json. Method, caveats and what each comparison does and does not establish: docs/benchmarks.md.