Skip to content

Releases

rapidfire 0.2.0

Choose a tag to compare

@alex09x alex09x released this 16 Sep 19:40

New MPSC API

  • rapidfire::mpsc::{bounded, unbounded}: cloneable senders and one receiver whose receive methods require &mut self.
  • recv_many(&mut buffer, limit): reuse a buffer and receive ready messages in batches, waiting only for the first message.
  • The general MPMC API remains available.

Fixes

  • Prevent completing send/receive futures from absorbing a later notification and stranding another waiter.
  • Keep a bounded channel's approximate len() within its capacity during concurrent receives and refills.

Measurements and verification

The complete benchmark matrix ran on all twelve original machines. Each passed 74 native tests, four doctests and 74 release tests with three-slot blocks. The updated CI also checks Loom, Miri, Linux x86-64/ARM64 and macOS.

MPSC performance depends on workload. With 40 producers, bounded(4096), 1 KiB messages and receive limit 32, the measured throughput improvement is 4.36× on Ryzen 7950X and 1.13× on M3 Pro. An unbounded four-producer case is 5.25× slower on Ryzen 9950X. These are throughput costs, not individual handoff latency; separate paced latency measurements are included.

See the full report, all samples, README and changelog.

rapidfire = "0.2"

rapidfire 0.1.0

Choose a tag to compare

@alex09x alex09x released this 15 Sep 17:50

First public release of rapidfire: a lock-free, zero-dependency async MPMC channel for Rust.

  • Bounded and unbounded channels, sync (try_send/try_recv/blocking) and async (send().await/recv().await) API, no dependencies but std.
  • In-crate block-list queue: lap-tagged slots, adaptive fetch_add/CAS producer claims, consumer-owned read marks, mutex-free sleep/wake hand-off.
  • Benchmarked against crossbeam-queue, flume, async-channel, tokio and std mpsc on 12 machines (Zen 2/4/5, Haswell, Neoverse-N1, Apple M3); full tables in benches/RESULTS.md, summary in the README.
  • Verified with unit, integration, loom and miri tests; CI on x86-64 Linux, ARM Linux and macOS.

Licensed under MIT OR Apache-2.0.