Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

lazily Benchmark Results

Generated benchmark data for the lazily reactive primitives library.

Benchmark Results

Generated for package lazily version 0.56.0.

Environment: rustc 1.97.0 (2d8144b78 2026-07-07) on x86_64-unknown-linux-gnu.

Refresh command:

python3 scripts/update-benchmark-results.py

Regression workflow:

cargo bench --features instrumentation,thread-safe -- --save-baseline before
# apply the performance patch
cargo bench --features instrumentation,thread-safe -- --baseline before
python3 scripts/update-benchmark-results.py --no-run

Regression budgets enforced by python3 scripts/update-benchmark-results.py --check:

Every ceiling is DERIVED from the recorded spread, never hand-typed; refresh the spreads with python3 scripts/update-benchmark-results.py --measure-budget-spread N. A counter with zero spread across idle, loaded and 2-core-pinned runs measures work items rather than interleaving, so it is enforced EXACTLY. A counter whose spread is under half its maximum gets headroom of one full observed range above the observed maximum. A counter whose spread exceeds half its maximum is measuring the scheduler, not the code: it is recorded as an observation and NOT enforced, because a gate that reddens on noise trains everyone to ignore it.

ProfileCounterObserved rangeSamplesClassificationEnforced ceiling
thread_safe_set_cell_invalidation_independent_slot_contention_16lock_acquisitions654-893750scheduling_sensitive1132
thread_safe_set_cell_invalidation_independent_slot_contention_16set_cell_invalidation255-255750deterministic255
thread_safe_set_cell_invalidation_independent_slot_contention_16dependency_edge16-16750deterministic16
thread_safe_set_cell_invalidation_independent_slot_contention_16get_refresh32-32750deterministic32
thread_safe_set_cell_invalidation_independent_slot_contention_16publish16-16750deterministic16
thread_safe_set_cell_invalidation_batched_write_bursts_16lock_acquisitions712-1477750scheduling_dominatednot enforced
thread_safe_set_cell_invalidation_batched_write_bursts_16other644-1154750scheduling_sensitive1664
thread_safe_set_cell_invalidation_batched_write_bursts_16set_cell_invalidation1-256750scheduling_dominatednot enforced
thread_safe_set_cell_invalidation_batched_write_bursts_16dependency_edge64-64750deterministic64
thread_safe_set_cell_invalidation_batched_write_bursts_16get_refresh2-2750deterministic2
thread_safe_set_cell_invalidation_batched_write_bursts_16publish1-1750deterministic1
thread_safe_contention_same_slot_write_read_16lock_acquisitions876-1420750scheduling_sensitive1964
thread_safe_contention_same_slot_write_read_16get_refresh2-125750scheduling_dominatednot enforced
thread_safe_contention_same_slot_write_read_16publish186-257750scheduling_sensitive328
thread_safe_contention_same_slot_write_read_16in_flight_wait0-367750scheduling_dominatednot enforced
thread_safe_contention_same_slot_write_read_16set_cell_invalidation256-256750deterministic256
thread_safe_contention_independent_slots_16lock_acquisitions924-1148750scheduling_sensitive1372
thread_safe_contention_independent_slots_16other350-574750scheduling_sensitive798
thread_safe_contention_independent_slots_16get_refresh32-32750deterministic32
thread_safe_contention_independent_slots_16publish271-271750deterministic271
thread_safe_contention_independent_slots_16dependency_edge16-16750deterministic16
thread_safe_contention_independent_slots_16set_cell_invalidation255-255750deterministic255
thread_safe_contention_read_mostly_waiters_16lock_acquisitions72-144750scheduling_sensitive216
thread_safe_contention_read_mostly_waiters_16get_refresh2-32750scheduling_dominatednot enforced
thread_safe_contention_read_mostly_waiters_16publish17-21750scheduling_sensitive25
thread_safe_contention_read_mostly_waiters_16in_flight_wait0-54750scheduling_dominatednot enforced
thread_safe_contention_batched_write_bursts_16lock_acquisitions713-1915750scheduling_dominatednot enforced
thread_safe_contention_batched_write_bursts_16other644-1154750scheduling_sensitive1664
thread_safe_contention_batched_write_bursts_16get_refresh2-38750scheduling_dominatednot enforced
thread_safe_contention_batched_write_bursts_16dependency_edge64-64750deterministic64
thread_safe_contention_batched_write_bursts_16set_cell_invalidation1-256750scheduling_dominatednot enforced
thread_safe_contention_batched_write_bursts_16publish2-256750scheduling_dominatednot enforced
thread_safe_contention_batched_write_bursts_16in_flight_wait0-250750scheduling_dominatednot enforced
thread_safe_effect_contention_queue_coalescing_16lock_acquisitions720-2025750scheduling_dominatednot enforced
thread_safe_effect_contention_queue_coalescing_16other655-1705750scheduling_dominatednot enforced
thread_safe_effect_contention_queue_coalescing_16dependency_edge64-64750deterministic64
thread_safe_effect_contention_queue_coalescing_16set_cell_invalidation1-256750scheduling_dominatednot enforced
thread_safe_effect_contention_queue_coalescing_16get_refresh0-0750deterministic0
thread_safe_effect_contention_queue_coalescing_16publish0-0750deterministic0
thread_safe_effect_contention_cleanup_execution_16lock_acquisitions619-1859750scheduling_dominatednot enforced
thread_safe_effect_contention_cleanup_execution_16other332-1572750scheduling_dominatednot enforced
thread_safe_effect_contention_cleanup_execution_16dependency_edge32-32750deterministic32
thread_safe_effect_contention_cleanup_execution_16set_cell_invalidation255-255750deterministic255
thread_safe_effect_contention_cleanup_execution_16get_refresh0-0750deterministic0
thread_safe_effect_contention_cleanup_execution_16publish0-0750deterministic0
thread_safe_effect_contention_batch_flush_16lock_acquisitions1239-2649750scheduling_dominatednot enforced
thread_safe_effect_contention_batch_flush_16other1169-2199750scheduling_sensitive3229
thread_safe_effect_contention_batch_flush_16get_refresh2-2750deterministic2
thread_safe_effect_contention_batch_flush_16dependency_edge65-65750deterministic65
thread_safe_effect_contention_batch_flush_16set_cell_invalidation1-256750scheduling_dominatednot enforced
thread_safe_effect_contention_batch_flush_16publish2-177750scheduling_dominatednot enforced

Budgets use lock acquisition counts instead of elapsed wait/hold time. Those counts are only deterministic for the 22 counters classified as such above; 19 of 51 gated counters are scheduling-dominated and carry no regression signal at all.

Synchronization strategy adoption gate:

StrategyStatusRequired throughput evidenceRequired p50/p95 latency evidenceLock-site and safety gate
current_std_mutex_condvarbaselinethread_safe_contention and thread_safe_effect_contention at 8/16 workersp50/p95 latency for same-slot, read-mostly, batch, and effect-heavy casesmust stay within current lock-site budgets and Loom safety coverage
narrower_condvar_wakeupsadopted for per-slot recompute waiterssame-slot write/read and read-mostly waiter throughput at 8/16 workersp50/p95 latency for waiter wakeup handoff and stale-completion retrymust not regress effect queue, cleanup, or batch flush budgets
parking_lot_style_parkingcandidate onlysame contention matrix measured against current_std_mutex_condvarp50/p95 latency for parking/unparking under 8/16 workersrequires no worse lock-site budgets plus a deadlock/starvation model
targeted_cascandidate onlyfresh cached reads and independent-slot throughput at 8/16 workersp50/p95 latency for revision validation fallback and publish racesrequires unchanged effect/batch/disposal budgets plus Loom/Shuttle proof

Candidates do not replace the current strategy before the same run reports throughput, p50/p95 latency, and lock-site budgets for the required 8/16-worker cases.

Required latency evidence uses Criterion sample per-iteration timing.

Watch-item A/B follow-up:

Watch itemBaseline/current refsFocused commandControlled rerun resultDecision
cached ThreadSafeContext read latencya8b6fc3 vs c917401cargo bench --features instrumentation,thread-safe --bench context -- cached_reads/thread_safe_context73.48 ns baseline vs 73.20 ns current on warm-cache repeatno tuning; the archived 56.5 ns row did not reproduce under controlled A/B
effect cleanup contention at 16 workersa8b6fc3 vs c917401cargo bench --features instrumentation,thread-safe --bench context -- thread_safe_effect_contention/cleanup_execution/162.31 ms baseline vs 2.43 ms current on warm-cache repeat with overlapping CIskeep watching; Criterion reported no statistically significant change
invalidation-frontier fast-path Arc cache (#lzfrontierarc)15d4206 vs this change (controlled –save-baseline before_opt A/B, same session)cargo bench --features instrumentation,thread-safe --bench context -- --baseline before_optfan_out_lazy_dirty_epochs/16 -46.8% (p=0.00), fan_in_lazy_dirty_epochs/16 -22.6% (p=0.00), independent_slot_contention/16 -17.3% (p=0.00), independent_slots/16 -5.3% (p=0.37 n.s.)adopted; the cached Arc reuses the BFS-time fast path in the marking pass, halving uninstrumented slot_fast_paths RwLock read acquisitions whose reader-count atomics dominate under 16-way contention. Deterministic state-mutex acquisition counts (the budget metric) are unchanged because slot_fast_paths is a separate uninstrumented lock; the evidence is the controlled wall-clock A/B. Microbench cases (cached_reads) correctly show no change as they do not touch the invalidation frontier.
Context slot clean-cache-hit fast path (#lzslotfastpath)8c64f33 vs this change (controlled –save-baseline before_slot A/B, same session)`cargo bench –features instrumentation,thread-safe –bench context – –baseline before_slot ’cached_readstyped_cache_reads’`typed_cache_reads/context_slot -58.9% (p=0.00), cached_reads/context -51.6% (p=0.00), typed_cache_reads/context_cell -2.1% (p=0.76 n.s.)
GroupCasep50p95Samples
thread_safe_contentionsame_slot_write_read / 82.812 ms3.329 ms10
thread_safe_contentionsame_slot_write_read / 166.853 ms7.923 ms10
thread_safe_contentionindependent_slots / 82.461 ms2.849 ms10
thread_safe_contentionindependent_slots / 165.549 ms6.543 ms10
thread_safe_contentionread_mostly_waiters / 8603.801 us718.127 us10
thread_safe_contentionread_mostly_waiters / 161.465 ms1.503 ms10
thread_safe_contentionbatched_write_bursts / 82.430 ms2.558 ms10
thread_safe_contentionbatched_write_bursts / 163.932 ms4.392 ms10
thread_safe_effect_contentionqueue_coalescing / 81.159 ms1.284 ms10
thread_safe_effect_contentionqueue_coalescing / 163.178 ms3.660 ms10
thread_safe_effect_contentioncleanup_execution / 81.277 ms1.423 ms10
thread_safe_effect_contentioncleanup_execution / 162.975 ms4.020 ms10
thread_safe_effect_contentionbatch_flush / 82.092 ms2.881 ms10
thread_safe_effect_contentionbatch_flush / 164.342 ms6.935 ms10
thread_safe_graph_propagationfan_out_eager_validation / 83.012 ms3.124 ms10
thread_safe_graph_propagationfan_out_eager_validation / 164.872 ms5.322 ms10
thread_safe_graph_propagationfan_out_lazy_dirty_epochs / 81.741 ms1.861 ms10
thread_safe_graph_propagationfan_out_lazy_dirty_epochs / 163.540 ms3.902 ms10
thread_safe_graph_propagationfan_in_lazy_dirty_epochs / 82.888 ms4.082 ms10
thread_safe_graph_propagationfan_in_lazy_dirty_epochs / 167.587 ms8.237 ms10
thread_safe_graph_propagationfan_in_batched_flush / 81.030 ms1.153 ms10
thread_safe_graph_propagationfan_in_batched_flush / 161.779 ms2.123 ms10

Criterion estimates are local mean wall-clock time per iteration.

GroupCaseMean95% CI
cached_readscontext2.336 ns2.313 ns - 2.363 ns
cached_readsthread_safe_context58.633 ns57.688 ns - 59.689 ns
cold_first_getcontext102.567 ns94.254 ns - 110.452 ns
cold_first_getthread_safe_context1.105 us1.053 us - 1.163 us
dependency_fan_outcontext / 322.290 us2.140 us - 2.445 us
dependency_fan_outcontext / 25617.442 us16.531 us - 18.338 us
dependency_fan_outthread_safe_context / 3219.216 us18.934 us - 19.585 us
dependency_fan_outthread_safe_context / 256149.046 us147.325 us - 150.915 us
set_cell_invalidationhigh_fan_out / 512104.624 us95.189 us - 113.806 us
set_cell_invalidationsame_slot_contention / 178.065 us75.748 us - 80.340 us
set_cell_invalidationsame_slot_contention / 2165.389 us162.757 us - 168.326 us
set_cell_invalidationsame_slot_contention / 4472.810 us460.139 us - 485.050 us
set_cell_invalidationsame_slot_contention / 81.266 ms1.187 ms - 1.340 ms
set_cell_invalidationsame_slot_contention / 162.752 ms2.628 ms - 2.884 ms
set_cell_invalidationindependent_slot_contention / 177.279 us76.071 us - 78.495 us
set_cell_invalidationindependent_slot_contention / 2156.226 us152.965 us - 159.624 us
set_cell_invalidationindependent_slot_contention / 4448.904 us433.647 us - 465.555 us
set_cell_invalidationindependent_slot_contention / 81.365 ms1.256 ms - 1.485 ms
set_cell_invalidationindependent_slot_contention / 162.732 ms2.488 ms - 2.991 ms
set_cell_invalidationbatched_write_bursts / 1142.353 us141.151 us - 143.418 us
set_cell_invalidationbatched_write_bursts / 2203.977 us201.505 us - 206.645 us
set_cell_invalidationbatched_write_bursts / 4491.988 us482.168 us - 501.495 us
set_cell_invalidationbatched_write_bursts / 81.201 ms1.149 ms - 1.249 ms
set_cell_invalidationbatched_write_bursts / 163.145 ms3.021 ms - 3.292 ms
memo_equality_suppressioncontext1.269 us1.166 us - 1.368 us
memo_equality_suppressionthread_safe_context25.558 us24.982 us - 26.338 us
effect_flushingcontext31.760 ns31.619 ns - 31.929 ns
effect_flushingthread_safe_context912.667 ns901.415 ns - 924.679 ns
batch_stormscontext / 641.999 us1.982 us - 2.021 us
batch_stormsthread_safe_context / 647.316 us7.277 us - 7.360 us
thread_safe_contentionsame_slot_write_read / 1130.742 us128.739 us - 132.731 us
thread_safe_contentionsame_slot_write_read / 2396.473 us383.073 us - 409.953 us
thread_safe_contentionsame_slot_write_read / 4971.636 us909.543 us - 1.031 ms
thread_safe_contentionsame_slot_write_read / 82.714 ms2.462 ms - 2.950 ms
thread_safe_contentionsame_slot_write_read / 167.027 ms6.709 ms - 7.353 ms
thread_safe_contentionindependent_slots / 1130.414 us127.419 us - 133.172 us
thread_safe_contentionindependent_slots / 2260.812 us254.009 us - 268.127 us
thread_safe_contentionindependent_slots / 4700.189 us668.411 us - 727.576 us
thread_safe_contentionindependent_slots / 82.451 ms2.293 ms - 2.606 ms
thread_safe_contentionindependent_slots / 165.523 ms5.050 ms - 5.960 ms
thread_safe_contentionread_mostly_waiters / 1130.430 us128.775 us - 132.244 us
thread_safe_contentionread_mostly_waiters / 2157.747 us154.031 us - 161.903 us
thread_safe_contentionread_mostly_waiters / 4231.663 us230.369 us - 233.106 us
thread_safe_contentionread_mostly_waiters / 8627.512 us586.493 us - 668.411 us
thread_safe_contentionread_mostly_waiters / 161.388 ms1.298 ms - 1.462 ms
thread_safe_contentionbatched_write_bursts / 1206.661 us205.032 us - 208.194 us
thread_safe_contentionbatched_write_bursts / 2545.496 us523.208 us - 570.543 us
thread_safe_contentionbatched_write_bursts / 41.411 ms1.401 ms - 1.421 ms
thread_safe_contentionbatched_write_bursts / 82.397 ms2.301 ms - 2.478 ms
thread_safe_contentionbatched_write_bursts / 163.960 ms3.759 ms - 4.151 ms
thread_safe_effect_contentionqueue_coalescing / 81.159 ms1.094 ms - 1.217 ms
thread_safe_effect_contentionqueue_coalescing / 163.124 ms2.887 ms - 3.345 ms
thread_safe_effect_contentioncleanup_execution / 81.278 ms1.209 ms - 1.343 ms
thread_safe_effect_contentioncleanup_execution / 163.200 ms2.932 ms - 3.478 ms
thread_safe_effect_contentionbatch_flush / 82.280 ms2.081 ms - 2.495 ms
thread_safe_effect_contentionbatch_flush / 165.026 ms4.398 ms - 5.718 ms
thread_safe_graph_propagationfan_out_eager_validation / 83.025 ms2.996 ms - 3.056 ms
thread_safe_graph_propagationfan_out_eager_validation / 164.953 ms4.867 ms - 5.060 ms
thread_safe_graph_propagationfan_out_lazy_dirty_epochs / 81.753 ms1.726 ms - 1.784 ms
thread_safe_graph_propagationfan_out_lazy_dirty_epochs / 163.567 ms3.476 ms - 3.666 ms
thread_safe_graph_propagationfan_in_lazy_dirty_epochs / 83.134 ms2.728 ms - 3.538 ms
thread_safe_graph_propagationfan_in_lazy_dirty_epochs / 167.596 ms7.221 ms - 7.941 ms
thread_safe_graph_propagationfan_in_batched_flush / 81.058 ms1.016 ms - 1.099 ms
thread_safe_graph_propagationfan_in_batched_flush / 161.827 ms1.750 ms - 1.915 ms
profile_instrumentationcontext_snapshot235.293 ns234.448 ns - 236.245 ns
profile_instrumentationthread_safe_snapshot293.183 us291.255 us - 294.845 us
async_cached_resolveasync_context4.722 us4.423 us - 5.046 us
async_cached_resolvesync_context_baseline68.269 ns65.310 ns - 71.694 ns
async_cached_resolvesync_get12.818 ns12.575 ns - 13.066 ns
async_cached_resolvethread_safe_context_baseline1.378 us1.354 us - 1.405 us
async_cold_resolveasync_context4.005 us3.834 us - 4.179 us
async_cold_resolvesync_context_baseline100.095 ns93.421 ns - 105.453 ns
async_cold_resolvethread_safe_context_baseline933.131 ns923.714 ns - 944.643 ns
async_invalidation_throughputasync_context276.614 us253.909 us - 303.372 us
async_invalidation_throughputsync_context_baseline2.452 us2.444 us - 2.464 us
async_invalidation_throughputthread_safe_context_baseline53.932 us53.844 us - 54.032 us
async_cancellation_throughputasync_invalidate_in_flight67.768 us54.110 us - 81.021 us
async_concurrent_contentionasync_context / 171.438 us70.571 us - 72.275 us
async_concurrent_contentionasync_context / 4337.954 us299.588 us - 367.654 us
async_concurrent_contentionasync_context / 161.942 ms1.793 ms - 2.100 ms
async_concurrent_contentionthread_safe_context_baseline / 179.512 us78.198 us - 80.677 us
async_concurrent_contentionthread_safe_context_baseline / 4662.336 us651.978 us - 670.977 us
async_concurrent_contentionthread_safe_context_baseline / 163.675 ms3.623 ms - 3.710 ms
async_effect_throughputasync_context188.151 ms188.039 ms - 188.238 ms
async_batch_throughputasync_context71.850 us67.474 us - 76.897 us
async_batch_throughputsync_context_baseline9.448 us8.598 us - 10.390 us
tokio_sync_cached_readsingle_task1.433 us1.427 us - 1.438 us
tokio_sync_cached_readspawn_read5.018 us4.698 us - 5.436 us
tokio_sync_cold_first_getsingle_task1.421 us1.393 us - 1.455 us
tokio_sync_cold_first_getspawn_compute5.195 us4.890 us - 5.505 us
tokio_sync_invalidationsingle_task55.059 us54.737 us - 55.394 us
tokio_sync_concurrent_contentionsame_slot_write_read / 160.281 us59.482 us - 61.148 us
tokio_sync_concurrent_contentionsame_slot_write_read / 4447.492 us414.606 us - 485.461 us
tokio_sync_concurrent_contentionsame_slot_write_read / 164.202 ms4.075 ms - 4.332 ms
tokio_sync_concurrent_contentionindependent_slots / 159.662 us59.075 us - 60.264 us
tokio_sync_concurrent_contentionindependent_slots / 4394.242 us363.367 us - 427.120 us
tokio_sync_concurrent_contentionindependent_slots / 163.263 ms3.166 ms - 3.350 ms
tokio_sync_batchspawn_batch46.970 us46.860 us - 47.088 us
tokio_sync_effectsingle_task10.091 ms10.088 ms - 10.094 ms
scalebuild65.284 ms64.821 ms - 65.809 ms
scalecold_full_recalc43.326 ms43.255 ms - 43.391 ms
scalefull_recalc_invalidate_all54.419 ms53.734 ms - 55.098 ms
scaleviewport_recalc2.297 us2.260 us - 2.347 us
queue_reactive_shell_overheadraw_vecdeque_push_pop1.264 ns1.215 ns - 1.322 ns
queue_reactive_shell_overheadsubscribed_len_push_pop93.316 ns89.570 ns - 99.791 ns
queue_reactive_shell_overheadunsubscribed_push_pop16.785 ns16.715 ns - 16.865 ns
revision_write_costpush / 1212.485 ns208.751 ns - 216.685 ns
revision_write_costpush / 161.051 us1.049 us - 1.054 us
revision_write_costpush / 1289.966 us9.913 us - 10.034 us
revision_write_costpush / 102497.254 us94.787 us - 99.737 us
revision_write_costrevision / 1122.388 ns122.202 ns - 122.593 ns
revision_write_costrevision / 16788.027 ns786.220 ns - 789.847 ns
revision_write_costrevision / 1288.254 us8.228 us - 8.282 us
revision_write_costrevision / 102472.269 us70.616 us - 74.098 us
revision_write_then_readpush / 1105.101 ns104.658 ns - 105.598 ns
revision_write_then_readpush / 161.292 us1.289 us - 1.296 us
revision_write_then_readpush / 12813.515 us13.465 us - 13.592 us
revision_write_then_readpush / 1024109.586 us108.925 us - 110.419 us
revision_write_then_readrevision / 192.298 ns91.863 ns - 92.979 ns
revision_write_then_readrevision / 161.214 us1.211 us - 1.216 us
revision_write_then_readrevision / 12812.944 us12.900 us - 12.997 us
revision_write_then_readrevision / 1024106.959 us106.744 us - 107.188 us
typed_cache_readscontext_cell0.737 ns0.735 ns - 0.738 ns
typed_cache_readscontext_rc_cell4.884 ns4.872 ns - 4.895 ns
typed_cache_readscontext_rc_slot7.498 ns7.210 ns - 7.861 ns
typed_cache_readscontext_slot2.271 ns2.263 ns - 2.280 ns
typed_cache_readsthread_safe_arc_slot64.431 ns64.001 ns - 65.137 ns
typed_cache_readsthread_safe_arc_string_slot64.132 ns63.956 ns - 64.334 ns
typed_cache_readsthread_safe_cell24.342 ns24.238 ns - 24.465 ns
typed_cache_readsthread_safe_slot57.543 ns57.000 ns - 58.113 ns
typed_cache_readsthread_safe_string_slot69.988 ns69.815 ns - 70.211 ns

Instrumentation snapshots are single local profile runs captured by examples/instrumentation_profile.rs.

ProfileAllocRecomputesDuplicate recomputesEdges +Edges -Effect pushesMax queueLock acquisitionsLock waitLock holdSidecar frontiersSidecar dirty marksSidecar fallbacksDirty epochs
context_memo_effect430412100.000 ns0.000 ns0000
context_fan_out_323364064320000.000 ns0.000 ns0000
context_batch_storm_646500128642100.000 ns0.000 ns0000
thread_safe_first_get_22101000114.660 us15.940 us0000
thread_safe_set_cell_invalidation_high_fan_out_5120000000370.000 ns508.394 us000512
thread_safe_set_cell_invalidation_same_slot_contention_12101000561.440 us18.830 us00016
thread_safe_set_cell_invalidation_same_slot_contention_2210100096114.761 us52.190 us00032
thread_safe_set_cell_invalidation_same_slot_contention_42101000172560.403 us76.491 us00064
thread_safe_set_cell_invalidation_same_slot_contention_821010003002.687 ms177.351 us000128
thread_safe_set_cell_invalidation_same_slot_contention_16210100054911.390 ms320.041 us000256
thread_safe_set_cell_invalidation_independent_slot_contention_12101000531.450 us12.220 us00015
thread_safe_set_cell_invalidation_independent_slot_contention_2420200010739.190 us23.890 us00031
thread_safe_set_cell_invalidation_independent_slot_contention_48404000178290.324 us50.760 us00063
thread_safe_set_cell_invalidation_independent_slot_contention_8168080003512.219 ms129.431 us000127
thread_safe_set_cell_invalidation_independent_slot_contention_1632160160006789.647 ms269.073 us000255
thread_safe_set_cell_invalidation_batched_write_bursts_15104000972.680 us47.010 us00015
thread_safe_set_cell_invalidation_batched_write_bursts_2910800012680.661 us71.180 us00011
thread_safe_set_cell_invalidation_batched_write_bursts_4171016000196536.435 us129.921 us0005
thread_safe_set_cell_invalidation_batched_write_bursts_83310320003722.020 ms218.222 us0005
thread_safe_set_cell_invalidation_batched_write_bursts_166510640007128.814 ms429.075 us0001
thread_safe_contention_same_slot_write_read_121701000721.920 us28.850 us00016
thread_safe_contention_same_slot_write_read_22210100013831.710 us52.670 us00032
thread_safe_contention_same_slot_write_read_425101000336148.824 us114.141 us00064
thread_safe_contention_same_slot_write_read_8211601000659233.610 us369.544 us000128
thread_safe_contention_same_slot_write_read_1622260100013011.289 ms591.265 us000256
thread_safe_contention_independent_slots_121601000681.760 us22.791 us00015
thread_safe_contention_independent_slots_24330200013934.880 us46.740 us00031
thread_safe_contention_independent_slots_486704000254488.475 us100.050 us00063
thread_safe_contention_independent_slots_816135080004873.782 ms253.891 us000127
thread_safe_contention_independent_slots_163227101600094218.712 ms548.815 us000255
thread_safe_contention_read_mostly_waiters_121701000721.930 us25.910 us00016
thread_safe_contention_read_mostly_waiters_221701000753.570 us26.600 us00016
thread_safe_contention_read_mostly_waiters_4217010008523.500 us35.450 us00016
thread_safe_contention_read_mostly_waiters_82180100011040.411 us51.520 us00016
thread_safe_contention_read_mostly_waiters_1621801000141181.890 us71.861 us00016
thread_safe_contention_batched_write_bursts_1516040001123.110 us57.260 us00015
thread_safe_contention_batched_write_bursts_29220800019361.892 us93.041 us00021
thread_safe_contention_batched_write_bursts_41740016000392347.523 us248.591 us00039
thread_safe_contention_batched_write_bursts_83360320003842.396 ms236.474 us0005
thread_safe_contention_batched_write_bursts_1665120640007618.077 ms451.265 us00011
thread_safe_effect_contention_queue_coalescing_83300320313751.655 ms214.062 us0000
thread_safe_effect_contention_queue_coalescing_166500640517417.927 ms415.253 us0000
thread_safe_effect_contention_cleanup_execution_8900883214082.219 ms168.331 us0000
thread_safe_effect_contention_cleanup_execution_161700161636170410.265 ms317.073 us0000
thread_safe_effect_contention_batch_flush_83440330516424.330 ms311.102 us0003
thread_safe_effect_contention_batch_flush_16665065091126313.865 ms560.432 us0004
thread_safe_graph_propagation_fan_out_eager_validation_8345600640501116717.536 ms3.801 ms0004096
thread_safe_graph_propagation_fan_out_eager_validation_16345610640501142472.138 ms6.855 ms0008192
thread_safe_graph_propagation_fan_out_lazy_dirty_epochs_8336403200049816.653 ms3.050 ms0004096
thread_safe_graph_propagation_fan_out_lazy_dirty_epochs_16336403200076773.114 ms6.013 ms0008192
thread_safe_graph_propagation_fan_in_lazy_dirty_epochs_8656606400014456.660 ms513.015 us000572
thread_safe_graph_propagation_fan_in_lazy_dirty_epochs_161291300128000278930.138 ms1.018 ms0001148
thread_safe_graph_propagation_fan_in_batched_flush_866151065025114092.606 ms578.384 us000258
thread_safe_graph_propagation_fan_in_batched_flush_16130130012903111835.961 ms570.577 us000141

ThreadSafe lock attribution for contention profiles:

ProfileSiteLock acquisitionsLock waitLock hold
thread_safe_set_cell_invalidation_high_fan_out_512other240.000 ns370.000 ns
thread_safe_set_cell_invalidation_high_fan_out_512set_cell_invalidation130.000 ns508.024 us
thread_safe_set_cell_invalidation_same_slot_contention_1other36910.000 ns1.660 us
thread_safe_set_cell_invalidation_same_slot_contention_1get_refresh260.000 ns170.000 ns
thread_safe_set_cell_invalidation_same_slot_contention_1dependency_edge130.000 ns440.000 ns
thread_safe_set_cell_invalidation_same_slot_contention_1set_cell_invalidation16420.000 ns16.270 us
thread_safe_set_cell_invalidation_same_slot_contention_1publish120.000 ns290.000 ns
thread_safe_set_cell_invalidation_same_slot_contention_2other6057.910 us3.380 us
thread_safe_set_cell_invalidation_same_slot_contention_2get_refresh260.000 ns150.000 ns
thread_safe_set_cell_invalidation_same_slot_contention_2dependency_edge130.000 ns350.000 ns
thread_safe_set_cell_invalidation_same_slot_contention_2set_cell_invalidation3256.731 us48.030 us
thread_safe_set_cell_invalidation_same_slot_contention_2publish130.000 ns280.000 ns
thread_safe_set_cell_invalidation_same_slot_contention_4other104276.211 us5.560 us
thread_safe_set_cell_invalidation_same_slot_contention_4get_refresh260.000 ns140.000 ns
thread_safe_set_cell_invalidation_same_slot_contention_4dependency_edge130.000 ns290.000 ns
thread_safe_set_cell_invalidation_same_slot_contention_4set_cell_invalidation64284.082 us70.231 us
thread_safe_set_cell_invalidation_same_slot_contention_4publish120.000 ns270.000 ns
thread_safe_set_cell_invalidation_same_slot_contention_8other1681.352 ms11.900 us
thread_safe_set_cell_invalidation_same_slot_contention_8get_refresh2260.000 ns2.700 us
thread_safe_set_cell_invalidation_same_slot_contention_8dependency_edge160.000 ns2.630 us
thread_safe_set_cell_invalidation_same_slot_contention_8set_cell_invalidation1281.334 ms158.011 us
thread_safe_set_cell_invalidation_same_slot_contention_8publish150.000 ns2.110 us
thread_safe_set_cell_invalidation_same_slot_contention_16other2895.344 ms16.970 us
thread_safe_set_cell_invalidation_same_slot_contention_16get_refresh270.000 ns470.000 ns
thread_safe_set_cell_invalidation_same_slot_contention_16dependency_edge130.000 ns630.000 ns
thread_safe_set_cell_invalidation_same_slot_contention_16set_cell_invalidation2566.046 ms301.401 us
thread_safe_set_cell_invalidation_same_slot_contention_16publish120.000 ns570.000 ns
thread_safe_set_cell_invalidation_independent_slot_contention_1other34900.000 ns1.310 us
thread_safe_set_cell_invalidation_independent_slot_contention_1get_refresh270.000 ns440.000 ns
thread_safe_set_cell_invalidation_independent_slot_contention_1dependency_edge130.000 ns630.000 ns
thread_safe_set_cell_invalidation_independent_slot_contention_1set_cell_invalidation15420.000 ns9.400 us
thread_safe_set_cell_invalidation_independent_slot_contention_1publish130.000 ns440.000 ns
thread_safe_set_cell_invalidation_independent_slot_contention_2other6822.950 us2.590 us
thread_safe_set_cell_invalidation_independent_slot_contention_2get_refresh4100.000 ns310.000 ns
thread_safe_set_cell_invalidation_independent_slot_contention_2dependency_edge260.000 ns560.000 ns
thread_safe_set_cell_invalidation_independent_slot_contention_2set_cell_invalidation3116.040 us19.910 us
thread_safe_set_cell_invalidation_independent_slot_contention_2publish240.000 ns520.000 ns
thread_safe_set_cell_invalidation_independent_slot_contention_4other99152.892 us4.060 us
thread_safe_set_cell_invalidation_independent_slot_contention_4get_refresh8211.000 ns620.000 ns
thread_safe_set_cell_invalidation_independent_slot_contention_4dependency_edge4100.000 ns1.110 us
thread_safe_set_cell_invalidation_independent_slot_contention_4set_cell_invalidation63137.011 us43.930 us
thread_safe_set_cell_invalidation_independent_slot_contention_4publish4110.000 ns1.040 us
thread_safe_set_cell_invalidation_independent_slot_contention_8other1921.137 ms10.890 us
thread_safe_set_cell_invalidation_independent_slot_contention_8get_refresh16540.000 ns2.000 us
thread_safe_set_cell_invalidation_independent_slot_contention_8dependency_edge8220.000 ns4.090 us
thread_safe_set_cell_invalidation_independent_slot_contention_8set_cell_invalidation1271.081 ms109.581 us
thread_safe_set_cell_invalidation_independent_slot_contention_8publish8220.000 ns2.870 us
thread_safe_set_cell_invalidation_independent_slot_contention_16other3594.260 ms20.650 us
thread_safe_set_cell_invalidation_independent_slot_contention_16get_refresh32990.000 ns3.380 us
thread_safe_set_cell_invalidation_independent_slot_contention_16dependency_edge16420.000 ns6.900 us
thread_safe_set_cell_invalidation_independent_slot_contention_16set_cell_invalidation2555.386 ms233.053 us
thread_safe_set_cell_invalidation_independent_slot_contention_16publish16410.000 ns5.090 us
thread_safe_set_cell_invalidation_batched_write_bursts_1other742.040 us14.690 us
thread_safe_set_cell_invalidation_batched_write_bursts_1get_refresh2130.000 ns990.000 ns
thread_safe_set_cell_invalidation_batched_write_bursts_1dependency_edge4100.000 ns2.240 us
thread_safe_set_cell_invalidation_batched_write_bursts_1set_cell_invalidation16390.000 ns25.050 us
thread_safe_set_cell_invalidation_batched_write_bursts_1publish120.000 ns4.040 us
thread_safe_set_cell_invalidation_batched_write_bursts_2other10479.961 us34.330 us
thread_safe_set_cell_invalidation_batched_write_bursts_2get_refresh2130.000 ns980.000 ns
thread_safe_set_cell_invalidation_batched_write_bursts_2dependency_edge8210.000 ns3.760 us
thread_safe_set_cell_invalidation_batched_write_bursts_2set_cell_invalidation11330.000 ns31.060 us
thread_safe_set_cell_invalidation_batched_write_bursts_2publish130.000 ns1.050 us
thread_safe_set_cell_invalidation_batched_write_bursts_4other172535.855 us101.611 us
thread_safe_set_cell_invalidation_batched_write_bursts_4get_refresh240.000 ns140.000 ns
thread_safe_set_cell_invalidation_batched_write_bursts_4dependency_edge16380.000 ns5.420 us
thread_safe_set_cell_invalidation_batched_write_bursts_4set_cell_invalidation5140.000 ns22.480 us
thread_safe_set_cell_invalidation_batched_write_bursts_4publish120.000 ns270.000 ns
thread_safe_set_cell_invalidation_batched_write_bursts_8other3322.019 ms185.041 us
thread_safe_set_cell_invalidation_batched_write_bursts_8get_refresh250.000 ns300.000 ns
thread_safe_set_cell_invalidation_batched_write_bursts_8dependency_edge32780.000 ns12.600 us
thread_safe_set_cell_invalidation_batched_write_bursts_8set_cell_invalidation5160.000 ns19.811 us
thread_safe_set_cell_invalidation_batched_write_bursts_8publish120.000 ns470.000 ns
thread_safe_set_cell_invalidation_batched_write_bursts_16other6448.812 ms384.343 us
thread_safe_set_cell_invalidation_batched_write_bursts_16get_refresh250.000 ns350.000 ns
thread_safe_set_cell_invalidation_batched_write_bursts_16dependency_edge641.680 us29.101 us
thread_safe_set_cell_invalidation_batched_write_bursts_16set_cell_invalidation120.000 ns14.931 us
thread_safe_set_cell_invalidation_batched_write_bursts_16publish120.000 ns350.000 ns
thread_safe_contention_same_slot_write_read_1other36910.000 ns1.470 us
thread_safe_contention_same_slot_write_read_1get_refresh260.000 ns320.000 ns
thread_safe_contention_same_slot_write_read_1dependency_edge130.000 ns460.000 ns
thread_safe_contention_same_slot_write_read_1set_cell_invalidation16470.000 ns13.770 us
thread_safe_contention_same_slot_write_read_1publish17450.000 ns12.830 us
thread_safe_contention_same_slot_write_read_2other6621.090 us2.480 us
thread_safe_contention_same_slot_write_read_2get_refresh260.000 ns150.000 ns
thread_safe_contention_same_slot_write_read_2dependency_edge130.000 ns320.000 ns
thread_safe_contention_same_slot_write_read_2set_cell_invalidation329.740 us24.360 us
thread_safe_contention_same_slot_write_read_2publish21790.000 ns25.360 us
thread_safe_contention_same_slot_write_read_2in_flight_wait160.000 ns0.000 ns
thread_safe_contention_same_slot_write_read_4other12278.313 us4.630 us
thread_safe_contention_same_slot_write_read_4get_refresh2112.240 us5.220 us
thread_safe_contention_same_slot_write_read_4dependency_edge130.000 ns270.000 ns
thread_safe_contention_same_slot_write_read_4set_cell_invalidation6451.531 us50.551 us
thread_safe_contention_same_slot_write_read_4publish516.710 us53.470 us
thread_safe_contention_same_slot_write_read_4in_flight_wait770.000 ns0.000 ns
thread_safe_contention_same_slot_write_read_8other25199.210 us8.990 us
thread_safe_contention_same_slot_write_read_8get_refresh61.060 us800.000 ns
thread_safe_contention_same_slot_write_read_8dependency_edge120.000 ns370.000 ns
thread_safe_contention_same_slot_write_read_8set_cell_invalidation12889.220 us111.221 us
thread_safe_contention_same_slot_write_read_8publish11644.100 us248.163 us
thread_safe_contention_same_slot_write_read_8in_flight_wait1570.000 ns0.000 ns
thread_safe_contention_same_slot_write_read_16other488478.632 us18.520 us
thread_safe_contention_same_slot_write_read_16get_refresh4215.450 us8.500 us
thread_safe_contention_same_slot_write_read_16dependency_edge120.000 ns410.000 ns
thread_safe_contention_same_slot_write_read_16set_cell_invalidation256676.484 us223.400 us
thread_safe_contention_same_slot_write_read_16publish226118.911 us340.435 us
thread_safe_contention_same_slot_write_read_16in_flight_wait2880.000 ns0.000 ns
thread_safe_contention_independent_slots_1other34830.000 ns1.550 us
thread_safe_contention_independent_slots_1get_refresh260.000 ns270.000 ns
thread_safe_contention_independent_slots_1dependency_edge130.000 ns820.000 ns
thread_safe_contention_independent_slots_1set_cell_invalidation15410.000 ns9.651 us
thread_safe_contention_independent_slots_1publish16430.000 ns10.500 us
thread_safe_contention_independent_slots_2other6919.530 us2.600 us
thread_safe_contention_independent_slots_2get_refresh4120.000 ns290.000 ns
thread_safe_contention_independent_slots_2dependency_edge260.000 ns940.000 ns
thread_safe_contention_independent_slots_2set_cell_invalidation317.010 us21.110 us
thread_safe_contention_independent_slots_2publish338.160 us21.800 us
thread_safe_contention_independent_slots_4other112197.463 us4.860 us
thread_safe_contention_independent_slots_4get_refresh8220.000 ns690.000 ns
thread_safe_contention_independent_slots_4dependency_edge490.000 ns1.710 us
thread_safe_contention_independent_slots_4set_cell_invalidation63183.671 us45.110 us
thread_safe_contention_independent_slots_4publish67107.031 us47.680 us
thread_safe_contention_independent_slots_8other2011.179 ms10.150 us
thread_safe_contention_independent_slots_8get_refresh16450.000 ns1.570 us
thread_safe_contention_independent_slots_8dependency_edge8220.000 ns3.260 us
thread_safe_contention_independent_slots_8set_cell_invalidation1271.466 ms115.011 us
thread_safe_contention_independent_slots_8publish1351.137 ms123.900 us
thread_safe_contention_independent_slots_16other3686.186 ms21.270 us
thread_safe_contention_independent_slots_16get_refresh32910.000 ns2.350 us
thread_safe_contention_independent_slots_16dependency_edge16430.000 ns6.060 us
thread_safe_contention_independent_slots_16set_cell_invalidation2556.200 ms253.442 us
thread_safe_contention_independent_slots_16publish2716.324 ms265.693 us
thread_safe_contention_read_mostly_waiters_1other36950.000 ns1.520 us
thread_safe_contention_read_mostly_waiters_1get_refresh250.000 ns300.000 ns
thread_safe_contention_read_mostly_waiters_1dependency_edge130.000 ns500.000 ns
thread_safe_contention_read_mostly_waiters_1set_cell_invalidation16410.000 ns10.580 us
thread_safe_contention_read_mostly_waiters_1publish17490.000 ns13.010 us
thread_safe_contention_read_mostly_waiters_2other36980.000 ns1.130 us
thread_safe_contention_read_mostly_waiters_2get_refresh41.590 us1.410 us
thread_safe_contention_read_mostly_waiters_2dependency_edge120.000 ns320.000 ns
thread_safe_contention_read_mostly_waiters_2set_cell_invalidation16480.000 ns11.060 us
thread_safe_contention_read_mostly_waiters_2publish17500.000 ns12.680 us
thread_safe_contention_read_mostly_waiters_2in_flight_wait10.000 ns0.000 ns
thread_safe_contention_read_mostly_waiters_4other366.450 us1.390 us
thread_safe_contention_read_mostly_waiters_4get_refresh610.000 us2.260 us
thread_safe_contention_read_mostly_waiters_4dependency_edge120.000 ns540.000 ns
thread_safe_contention_read_mostly_waiters_4set_cell_invalidation16470.000 ns11.540 us
thread_safe_contention_read_mostly_waiters_4publish176.560 us19.720 us
thread_safe_contention_read_mostly_waiters_4in_flight_wait90.000 ns0.000 ns
thread_safe_contention_read_mostly_waiters_8other365.240 us1.360 us
thread_safe_contention_read_mostly_waiters_8get_refresh1733.370 us3.980 us
thread_safe_contention_read_mostly_waiters_8dependency_edge120.000 ns330.000 ns
thread_safe_contention_read_mostly_waiters_8set_cell_invalidation161.110 us12.460 us
thread_safe_contention_read_mostly_waiters_8publish18671.000 ns33.390 us
thread_safe_contention_read_mostly_waiters_8in_flight_wait220.000 ns0.000 ns
thread_safe_contention_read_mostly_waiters_16other3628.800 us1.681 us
thread_safe_contention_read_mostly_waiters_16get_refresh28133.230 us15.500 us
thread_safe_contention_read_mostly_waiters_16dependency_edge130.000 ns320.000 ns
thread_safe_contention_read_mostly_waiters_16set_cell_invalidation161.410 us14.150 us
thread_safe_contention_read_mostly_waiters_16publish1818.420 us40.210 us
thread_safe_contention_read_mostly_waiters_16in_flight_wait420.000 ns0.000 ns
thread_safe_contention_batched_write_bursts_1other742.120 us15.370 us
thread_safe_contention_batched_write_bursts_1get_refresh260.000 ns180.000 ns
thread_safe_contention_batched_write_bursts_1dependency_edge4100.000 ns1.520 us
thread_safe_contention_batched_write_bursts_1set_cell_invalidation16450.000 ns27.270 us
thread_safe_contention_batched_write_bursts_1publish16380.000 ns12.920 us
thread_safe_contention_batched_write_bursts_2other12452.151 us27.750 us
thread_safe_contention_batched_write_bursts_2get_refresh260.000 ns140.000 ns
thread_safe_contention_batched_write_bursts_2dependency_edge8190.000 ns2.820 us
thread_safe_contention_batched_write_bursts_2set_cell_invalidation211.580 us43.191 us
thread_safe_contention_batched_write_bursts_2publish227.911 us19.140 us
thread_safe_contention_batched_write_bursts_2in_flight_wait160.000 ns0.000 ns
thread_safe_contention_batched_write_bursts_4other241291.443 us68.700 us
thread_safe_contention_batched_write_bursts_4get_refresh48.160 us1.840 us
thread_safe_contention_batched_write_bursts_4dependency_edge16420.000 ns6.320 us
thread_safe_contention_batched_write_bursts_4set_cell_invalidation4014.540 us95.211 us
thread_safe_contention_batched_write_bursts_4publish4032.960 us76.520 us
thread_safe_contention_batched_write_bursts_4in_flight_wait510.000 ns0.000 ns
thread_safe_contention_batched_write_bursts_8other3322.394 ms186.453 us
thread_safe_contention_batched_write_bursts_8get_refresh250.000 ns240.000 ns
thread_safe_contention_batched_write_bursts_8dependency_edge32880.000 ns13.770 us
thread_safe_contention_batched_write_bursts_8set_cell_invalidation5140.000 ns20.790 us
thread_safe_contention_batched_write_bursts_8publish6190.000 ns15.221 us
thread_safe_contention_batched_write_bursts_8in_flight_wait70.000 ns0.000 ns
thread_safe_contention_batched_write_bursts_16other6648.074 ms337.402 us
thread_safe_contention_batched_write_bursts_16get_refresh260.000 ns350.000 ns
thread_safe_contention_batched_write_bursts_16dependency_edge641.670 us31.071 us
thread_safe_contention_batched_write_bursts_16set_cell_invalidation11340.000 ns41.181 us
thread_safe_contention_batched_write_bursts_16publish12400.000 ns41.261 us
thread_safe_contention_batched_write_bursts_16in_flight_wait80.000 ns0.000 ns
thread_safe_effect_contention_queue_coalescing_8other3411.654 ms187.412 us
thread_safe_effect_contention_queue_coalescing_8dependency_edge32810.000 ns10.710 us
thread_safe_effect_contention_queue_coalescing_8set_cell_invalidation250.000 ns15.940 us
thread_safe_effect_contention_queue_coalescing_16other6737.925 ms377.592 us
thread_safe_effect_contention_queue_coalescing_16dependency_edge641.660 us20.880 us
thread_safe_effect_contention_queue_coalescing_16set_cell_invalidation4110.000 ns16.781 us
thread_safe_effect_contention_cleanup_execution_8other2651.236 ms45.260 us
thread_safe_effect_contention_cleanup_execution_8dependency_edge16440.000 ns7.530 us
thread_safe_effect_contention_cleanup_execution_8set_cell_invalidation127983.136 us115.541 us
thread_safe_effect_contention_cleanup_execution_16other4174.902 ms70.260 us
thread_safe_effect_contention_cleanup_execution_16dependency_edge32810.000 ns10.690 us
thread_safe_effect_contention_cleanup_execution_16set_cell_invalidation2555.361 ms236.123 us
thread_safe_effect_contention_batch_flush_8other6004.329 ms271.202 us
thread_safe_effect_contention_batch_flush_8get_refresh260.000 ns460.000 ns
thread_safe_effect_contention_batch_flush_8dependency_edge33890.000 ns14.010 us
thread_safe_effect_contention_batch_flush_8set_cell_invalidation390.000 ns17.960 us
thread_safe_effect_contention_batch_flush_8publish4170.000 ns7.470 us
thread_safe_effect_contention_batch_flush_16other118713.863 ms487.692 us
thread_safe_effect_contention_batch_flush_16get_refresh260.000 ns450.000 ns
thread_safe_effect_contention_batch_flush_16dependency_edge651.700 us35.350 us
thread_safe_effect_contention_batch_flush_16set_cell_invalidation4110.000 ns19.450 us
thread_safe_effect_contention_batch_flush_16publish5140.000 ns17.490 us
thread_safe_graph_propagation_fan_out_eager_validation_8other3511.611 ms101.630 us
thread_safe_graph_propagation_fan_out_eager_validation_8get_refresh641.730 us4.820 us
thread_safe_graph_propagation_fan_out_eager_validation_8dependency_edge641.680 us24.630 us
thread_safe_graph_propagation_fan_out_eager_validation_8set_cell_invalidation12813.423 ms3.194 ms
thread_safe_graph_propagation_fan_out_eager_validation_8publish5602.499 ms476.084 us
thread_safe_graph_propagation_fan_out_eager_validation_16other47916.908 ms99.181 us
thread_safe_graph_propagation_fan_out_eager_validation_16get_refresh641.830 us4.810 us
thread_safe_graph_propagation_fan_out_eager_validation_16dependency_edge641.720 us24.180 us
thread_safe_graph_propagation_fan_out_eager_validation_16set_cell_invalidation25649.780 ms6.258 ms
thread_safe_graph_propagation_fan_out_eager_validation_16publish5615.446 ms468.495 us
thread_safe_graph_propagation_fan_out_lazy_dirty_epochs_8other2104.299 ms10.570 us
thread_safe_graph_propagation_fan_out_lazy_dirty_epochs_8get_refresh641.840 us5.700 us
thread_safe_graph_propagation_fan_out_lazy_dirty_epochs_8dependency_edge32840.000 ns14.850 us
thread_safe_graph_propagation_fan_out_lazy_dirty_epochs_8set_cell_invalidation12812.349 ms2.981 ms
thread_safe_graph_propagation_fan_out_lazy_dirty_epochs_8publish641.810 us38.151 us
thread_safe_graph_propagation_fan_out_lazy_dirty_epochs_16other35116.035 ms12.310 us
thread_safe_graph_propagation_fan_out_lazy_dirty_epochs_16get_refresh641.740 us4.550 us
thread_safe_graph_propagation_fan_out_lazy_dirty_epochs_16dependency_edge32840.000 ns13.250 us
thread_safe_graph_propagation_fan_out_lazy_dirty_epochs_16set_cell_invalidation25657.075 ms5.949 ms
thread_safe_graph_propagation_fan_out_lazy_dirty_epochs_16publish641.670 us33.990 us
thread_safe_graph_propagation_fan_in_lazy_dirty_epochs_8other7392.418 ms32.761 us
thread_safe_graph_propagation_fan_in_lazy_dirty_epochs_8get_refresh681.950 us8.900 us
thread_safe_graph_propagation_fan_in_lazy_dirty_epochs_8dependency_edge641.760 us23.670 us
thread_safe_graph_propagation_fan_in_lazy_dirty_epochs_8set_cell_invalidation5084.236 ms398.384 us
thread_safe_graph_propagation_fan_in_lazy_dirty_epochs_8publish661.750 us49.300 us
thread_safe_graph_propagation_fan_in_lazy_dirty_epochs_16other137910.357 ms53.961 us
thread_safe_graph_propagation_fan_in_lazy_dirty_epochs_16get_refresh1323.720 us12.700 us
thread_safe_graph_propagation_fan_in_lazy_dirty_epochs_16dependency_edge1283.390 us50.900 us
thread_safe_graph_propagation_fan_in_lazy_dirty_epochs_16set_cell_invalidation102019.770 ms810.545 us
thread_safe_graph_propagation_fan_in_lazy_dirty_epochs_16publish1303.530 us89.680 us
thread_safe_graph_propagation_fan_in_batched_flush_8other4712.369 ms176.243 us
thread_safe_graph_propagation_fan_in_batched_flush_8get_refresh70626.721 us90.430 us
thread_safe_graph_propagation_fan_in_batched_flush_8dependency_edge651.720 us23.620 us
thread_safe_graph_propagation_fan_in_batched_flush_8set_cell_invalidation16510.000 ns145.311 us
thread_safe_graph_propagation_fan_in_batched_flush_8publish151207.472 us142.780 us
thread_safe_graph_propagation_fan_in_batched_flush_16other7885.938 ms335.656 us
thread_safe_graph_propagation_fan_in_batched_flush_16get_refresh1323.690 us13.750 us
thread_safe_graph_propagation_fan_in_batched_flush_16dependency_edge1293.390 us50.290 us
thread_safe_graph_propagation_fan_in_batched_flush_16set_cell_invalidation43.090 us87.640 us
thread_safe_graph_propagation_fan_in_batched_flush_16publish13012.840 us83.241 us

Scale (≥1M cells) — #lzscalebench

The scale group in the generated section above is a rigorous criterion benchmark over a spreadsheet-shaped graph of N input cells + N formula slots (formula[i] = input[i] + input[i-1]). At the default N = 1_000_000 that is ~2,000,000 reactive nodes. It is gated behind the scale-bench feature so a plain cargo bench skips it; the benchmark generator enables the feature so the group is tracked by make benchmark-check. Run it directly, or at a larger size:

cargo bench --features scale-bench --bench scale
LAZILY_SCALE_N=2000000 cargo bench --features scale-bench --bench scale

What the four cases show at N = 1_000_000 (reference machine below): build constructs 2M nodes (~0.12 s), cold_full_recalc computes every formula from cold (~0.105 s), full_recalc_invalidate_all re-edits every input and recomputes the whole sheet (~0.080 s), and viewport_recalc edits one input and reads only a 1,000-cell viewport — ~3.7 µs, ~21,000× cheaper than a full recalc because the lazy pull-based model leaves off-viewport formulas dirty and never recomputes them (the property a viewport-rendered spreadsheet needs). (build/cold_full_recalc/full_recalc_invalidate_all are unaffected by the v0.22.2 #lzslotfastpath refresh fast path — they are cold/slow-path — so their figures are retained from the original run; only viewport_recalc, which is ~998/1000 cache-hit reads, moved, by the controlled A/B below. The generated scale rows in the table above reflect the latest single criterion run on this host and drift with host load for the allocation-heavy build/cold cases; the curated baseline here is the reference.)

Memory (not captured by criterion): building 2,000,000 nodes uses ~414 MiB RSS, i.e. ~216 B/node, so 1M populated formula cells land in the low hundreds of MiB.

Spreadsheet cell-count context

How the two dominant spreadsheets bound a sheet:

SpreadsheetDocumented limitCells
Google Sheets10,000,000 cells per workbook (also 18,278 columns max)10,000,000
Microsoft Excel1,048,576 rows × 16,384 columns per worksheet17,179,869,184

Google Sheets (10M cells) — measured. Modeled as 5,000,000 input cells + 5,000,000 formula cells (= 10M cells) by running the bench at LAZILY_SCALE_N=5000000. Criterion median on the cross-language reference machine (AMD Ryzen 9 9950X3D), pinned to one core (taskset -c 4) and run serially so nothing contends for L3 / memory bandwidth:

casemeanper cell
build (10M cells)~718 ms~72 ns
cold_full_recalc (5M)~544 ms~109 ns
full_recalc_invalidate_all (5M)~398 ms~80 ns
viewport_recalc (1k)~3.8 µs~4 ns

So lazily backs a full-capacity Google Sheets workbook: build under a second, full recompute ~0.5 s, and — crucially — viewport recalc stays ~3.8 µs independent of sheet size (it was ~3.7 µs at 1M too), because the lazy pull-based model only recomputes the cells you read. Reproduce: LAZILY_SCALE_N=5000000 cargo bench --features scale-bench --bench scale. Across the three implementations lazily-rs holds the cheapest viewport reads (3.7–3.8 µs); see the cross-language table in lazily-zig’s BENCHMARKS.md for the full head-to-head.

Controlled A/B isolating the v0.22.2 #lzslotfastpath refresh fast path on viewport_recalc (--save-baseline pre_fix, same session, toggling only src/context.rs between 8c64f33 and 1390a6e): 13.78 µs → 4.49 µs, −64.1% (p=0.00) at N = 1_000_000. Only ~2 of the 1,000 viewport cells recompute; the other ~998 are cache-hit slot reads, each now ~7 ns cheaper because refresh_slot early-returns on a clean hit instead of cloning the dependency Vec and walking deps.

Microsoft Excel (17.18B grid) — sparse, not dense. Excel’s 1,048,576 × 16,384 = 17,179,869,184 is the grid capacity, not a populated-cell count. Building all 17.18B cells densely would need ~7 TB at ~216 B/node — infeasible and unrepresentative: real sheets populate a tiny fraction of the grid, and lazily’s storage is a sparse arena (Vec<Option<Node>> with a free-list) that only allocates cells you actually create. The practical limit is therefore populated cells vs. available RAM, not the 17.18B grid. With the flat per-node cost above (~216 B, ~70–100 ns/cell), capacity ≈ available RAM ÷ ~216 B — e.g. this 186 GB host could hold on the order of ~10⁸–10⁹ populated cells, far beyond any realistically-populated Excel sheet. The scale group’s linear scaling (1M → 10M held ~constant per-cell cost) is the evidence that the model extrapolates rather than degrading at spreadsheet capacity.

Cross-library comparison — #lzscalecompare

Head-to-head against leptos_reactive (Leptos 0.6’s fine-grained reactivity) on the identical spreadsheet graph (N input signals + N formula memos, formula[i] = input[i] + input[i-1]), in the same criterion harness on the same host. leptos_reactive is the fair apples-to-apples pick: like lazily it is a lazy, pull-based memo system (a memo recomputes only when read while dirty), so this isolates per-node runtime overhead and the lazy-pull viewport property rather than comparing a pull model against an eager push one. (JS signal libraries — Solid, MobX, Preact Signals — are a different runtime and are excluded; the standard js-reactivity-benchmark / cellx harnesses also measure small/medium graphs, not a 100k-node sheet.)

Measured at N = 100_000 (200,000 nodes/library; leptos is far heavier per node, so this size keeps its wall clock feasible — lazily’s own 1M/10M numbers are above):

caselazilyleptos_reactiveratio
build (200k nodes)8.58 ms12.89 mslazily 1.5× faster
cold_full_recalc (100k formulas)8.45 ms30.06 mslazily 3.6× faster
full_recalc_invalidate_all (100k)6.26 ms17.29 mslazily 2.8× faster
viewport_recalc (edit 1, read 1k)~4.5 µs8.22 µslazily ~1.8× faster

† lazily’s viewport_recalc is post-v0.22.2 (#lzslotfastpath). Before that refresh fast path it measured 11.52 µs and leptos led ~1.4× (the original row this table shipped with). The v0.22.2 controlled A/B on this case is 13.78 µs → 4.49 µs, −64.1% (p=0.00) (--save-baseline pre_fix, toggling only src/context.rs). leptos_reactive is an unchanged external library so its 8.22 µs is retained from the original same-host run; a fresh same-session re-measure under load gave ~10.5 µs, i.e. lazily leads by ~1.8–2.3× depending on leptos’s run-to-run variance.

Honest read: lazily now leads all four cases — building the sheet (1.5×), computing it cold (3.6×), recomputing the whole sheet after a full invalidation (2.8×), and the cached-read-dominated viewport read (~1.8×) — driven by its sparse arena + lean single-threaded Context versus leptos’s runtime slotmap and subscriber bookkeeping, plus the v0.22.2 refresh_slot clean-cache-hit fast path that removed the per-read dependency-walk tax on the ~998/1000 viewport cells that are cache hits. The fairness evidence is no longer “leptos wins a case” (it did, before v0.22.2, and that historical result is documented in the footnote above) — it is that leptos’s genuine 30 ms cold recalc proves its memos truly recompute (this is not a straw-man comparison), and that lazily’s viewport lead is a recent code improvement, not an inherent property: the pre-v0.22.2 code lost this case. The shared headline is unchanged: the lazy-pull property both exhibit — a one-input edit + bounded-viewport read is microseconds, ~1000× cheaper than a full recalc, independent of total sheet size — neither library recomputes off-viewport formulas. The defensible claim is now “lazily has materially higher throughput than a comparable native-Rust pull-based reactive system across both whole-graph and incremental-viewport workloads,” not a blanket “fastest reactive library.”

Reproduce (gated behind the scale-compare feature so the comparison dependency is never pulled into normal builds / make check):

cargo bench --features scale-compare --bench scale_compare
LAZILY_SCALE_N=250000 cargo bench --features scale-compare --bench scale_compare

Cross-language comparison (lazily-rs / lazily-cpp / lazily-zig)

Head-to-head on the same spreadsheet-shaped workload (N input cells + N formula slots, formula[i] = input[i] + input[i-1]), measured on x86_64 Linux. lazily-rs uses criterion; lazily-cpp uses its std::chrono harness; lazily-zig uses clock_gettime(.MONOTONIC) for the scale bench. Numbers are the current published results from each repo’s BENCHMARKS.md.

Micro-benchmarks (single-threaded Context unless noted)

Metriclazily-rslazily-cpplazily-zig
cached read (Context)5.7 ns23 ns— †
cached read (ThreadSafeContext)68 ns22 ns— †
cold first get (Context)129 ns97 ns— †
cold first get (ThreadSafeContext)1.17 µs107 ns— †
fan-out 256 (Context)58.4 µs1.12 µs— †
fan-out 256 (ThreadSafeContext)182 µs1.68 µs
set_cell high_fan_out 512139 µs3.26 µs— †
memo equality suppression (Context)3.3 µs34 ns— †
effect flushing (Context)90 ns87 ns
batch storms 64 (Context)3.1 µs1.55 µs

† lazily-zig 0.17-dev removed std.time.Timer, so its reactive-core micro-bench is counter-based (deterministic work-counts: allocations, edges, recomputes — not wall-clock). The counters confirm the same zero-work steady state (cached reads = 0 allocs / 0 recomputes) but are not directly comparable on a wall-clock axis. See lazily-zig BENCHMARKS.md.

Scale — 1M rows (~2M cells)

Metriclazily-rslazily-cpplazily-zig
build (2N nodes)105 ms123 ms132 ms
cold full recalc106 ms36 ms381 ms
viewport recalc (edit 1, read 1k)4.5 µs35.1 µs6.4 µs

Scale — 10M cells (full Google Sheets workbook capacity)

Metriclazily-rslazily-cpplazily-zig
build706 ms1.41 s1.13 s
cold full recalc518 ms415 ms2.26 s
viewport recalc4.1 µs43.8 µs6.6 µs

Honest read: lazily-rs’s monomorphized Rc<T> fast path leads the spreadsheet-scale build wall clock (leanest per-node storage) and — after the v0.22.2 #lzslotfastpath refresh fast path — delivers the cheapest viewport reads of the three (4.5 µs @ 1M, 4.1 µs @ 10M, undercutting lazily-zig’s integer-keyed cache at 6.4/6.6 µs). lazily-cpp’s v0.6.0 SmallAny inline value storage (optimization B) + alloc-free batch bookkeeping (E) flipped the cold-recalc lead: lazily-cpp cold full recalc is now ~3× faster than lazily-rs at both 1M (36 vs 106 ms) and 10M (415 vs 518 ms), and its batch_storms now edges out lazily-rs (1.55 vs 3.1 µs). lazily-cpp’s type-erased SmallFn + SmallVec node layout still wins the high-fan-out micro-benchmarks (fan-out 256, set_cell 512, memo equality) by 16–49× over lazily-rs. The shared headline across all three: they back a full-capacity Google Sheets workbook and all exhibit the lazy-pull viewport property — a one-cell edit + bounded-viewport read stays in the microsecond range, independent of sheet size, because off-viewport formulas are left dirty and never recomputed (~2,000–60,000× cheaper than a full recalc across the three runtimes).

Phase 3 Wire-Format Optimizations (#lzperfaudit)

Three spec-ratified wire wins (#lzspecfrontiersuppress, #lzspecbase64, #lzspecintern), measured by benches/wire_optimizations.rs. Run with:

cargo bench --features json-base64 --bench wire_optimizations

#lzspecfrontiersuppress — optional CrdtSync frontier

Omitting the stamp frontier when unchanged cuts wire size and encode/decode cost:

VariantWire sizeEncodeDecode
with frontier (8 peers)879 B~740 ns~1.6 µs
ops only (suppressed)514 B (−42%)~463 ns~1.0 µs

#lzspecbase64 — base64 byte arrays vs JSON-u8 arrays

Under the json-base64 capability flag, Inline/Payload bytes travel as base64 strings instead of JSON integer arrays:

Payloadjson-u8 wirebase64 wireSavingsDecode (u8 → b64)
64 B395 B228 B42%911 ns → 710 ns
1 KiB4,235 B1,508 B64%36 µs → 25 µs
16 KiB65,675 B21,988 B67%89 µs → 65 µs

#lzspecintern — batch string-intern table

Deduplicating repeated type_tag strings into a sidecar intern table (256 nodes, 4 distinct tags):

VariantWire sizeSavings
inline tags15,729 B
interned14,890 B5%

Savings grow with the node-to-tag ratio (more nodes sharing fewer tags).

Revision engine crossover (#lzspecrevisionengine)

The revision (pull) invalidation engine gives O(1) writes (no dependent cone walk) at the cost of O(changed-subpath) reads. Observable values are provably identical to push mode (get_equiv_push, lazily-formal RevisionEngine.lean).

Benchmark: 10 writes to a source cell with N dependent slots (construction + priming included in each measurement). Run with:

cargo bench --bench revision_engine
Fan-outPushRevisionRevision win
1194 ns127 ns1.5×
161.19 µs822 ns1.4×
12810.9 µs8.75 µs1.25×
1024192 µs177 µs1.08×

The write cost scales linearly with fan-out in push (O(N) dirty walk) but is O(1) in revision (revision bump). The construction+priming overhead (same for both) dilutes the pure write-cost gap; workloads with high write:read ratios and large fan-out benefit most.

Multi-Language

lazily is implemented across three languages with shared semantics:

lazily-rslazily-ziglazily-py
ContextOwned Context structExplicit allocatorPlain dict
Slot creationBox<dyn Fn> closurescomptime function pointersLambdas
Cell equalityPartialEq traitstd.meta.eql!= operator
Thread safetySingle-threaded Context; explicit ThreadSafeContextMutex by defaultGIL
StorageUnified generics.direct / .indirectObject identity

License

MIT