Two compile fixes: - tokio_favored.rs bench_mpsc_smarm: consumer spawn closure returned u64 via bare 'count' tail expression; smarm::Runtime::run() requires FnOnce()->(). Fixed to 'let _ = count;'. Same fix on the consumer.join() call site. - smarm_favored.rs bench_unc_smarm: same pattern, same fix. Baseline run: Intel Xeon @ 2.80GHz, 1 core, kernel 6.18.5, rustc 1.95.0, smarm 0.3.0, no RUSTFLAGS. Single-CPU sandbox — N-thread rows identical to 1-thread; scaling sweep limited to 1 thread. Notable findings: - deep_recursion: tokio wins (22 vs 62 us); mmap stack alloc cost dominates for single-use actors at depth 500. - yield_in_hot_loop: tokio wins (138 vs 182 ms); smarm mutex overhead on yield_now exceeds expected naked-switch advantage on 1 CPU. - mpsc_contention/uncontended_channel/catch_unwind_panics: smarm wins as predicted. - spawn_storm_busy: smarm 47x slower; global mutex saturated by bg yielders.
8 lines
515 B
Plaintext
8 lines
515 B
Plaintext
Counting primes in [2, 200000) across 16 workers, 5 iterations each
|
|
|
|
runtime | primes found | median | min | max
|
|
--------------------------------------------------------------------------------
|
|
baseline | primes: 17984 | median: 7244 µs | min: 7231 µs | max: 7509 µs
|
|
smarm | primes: 17984 | median: 7592 µs | min: 7505 µs | max: 8130 µs
|
|
tokio | primes: 17984 | median: 7263 µs | min: 7225 µs | max: 9067 µs
|