Compare in-process queue libraries across Python, Rust, JavaScript, C#, and C.
| Start here | |
|---|---|
| Home | Documentation |
| Numbers | Live dashboard |
| Experiments | One-question tests |
| Benchmarks | Design · Methodology · Metrics |
| Audience | Use case |
|---|---|
| Students | Queue types, backpressure, what “fast” actually means |
| System integrators | Pick an in-process queue that fits the runtime |
| Researchers | Reproducible measurement and one-question experiments |
| Library authors | Add a queue, version A/B, regression checks |
- C —
mutex-queue,lfqueue,spsc-ring - C# (.NET) —
Queue+lock,ConcurrentQueue,BlockingCollection,Channel - JavaScript —
Array,denque,yocto-queue,fastq,p-queue(scheduler) - Python —
deque-lock,queue.Queue,queue.SimpleQueue,asyncio.Queue,janus,spsc-ring - Rust —
std-mpsc,crossbeam-channel,flume,tokio-mpsc,async-channel,crossbeam-queue
Adding a language · Adding a queue.
This suite measures local queues on one machine. Compare inside one
language and one communication category: thread, async, and
opt-in process / IPC, shared memory, and durable / disk.
Network brokers (Redis, Kafka, ZeroMQ) need a different lab — never on
the same chart as deque-lock.
Requires a recent Python 3 and uv (or pip). No Docker.
git clone https://github.com/leo-gan/queue-benchmark.git
cd queue-benchmark
./scripts/check-host-requirements.sh python # optional: see what's missing
./scripts/install-host-requirements.sh python # optional: user-local toolchains
cd python && ./scripts/run-benchmarks.sh smoke
# → logs/python/YYYY-MM-DD-HHMMSS.csvThen run analyze-benchmarks -l python after installing the analysis package.
Prefer Rust? ./scripts/run-all-benchmarks.sh --mode smoke --lang rust
Benchmark runners run natively on the host (no Docker). Prepare toolchains once,
then run (project deps like uv sync / npm install still happen inside each runner).
# 1) Host toolchains (compilers/runtimes only)
./scripts/check-host-requirements.sh
./scripts/install-host-requirements.sh
./scripts/install-host-requirements.sh csharp # one language
# 2) Smoke one language
./python/scripts/run-benchmarks.sh smoke
# or: ./rust/scripts/run-benchmarks.sh smoke
# Orchestrator: all languages or one language
./scripts/run-all-benchmarks.sh --mode all-single
./scripts/run-all-benchmarks.sh --mode full --lang rust
# Analysis package (writes reports/; Dashboard via sync-data.py)
cd analysis && uv pip install -e . # or: pip install -e .
analyze-benchmarks
analyze-benchmarks -l python
analyze-benchmarks --compare-a rust:2026-08-31-120000 --compare-b rust:latestModes: smoke (2 reps) · all-single (10) · full (100) · research (500).
analyze-benchmarks writes reports/; Dashboard via sync-data.py. Review and
commit before publish-docs deploys the site.
Shared payload sizes: 256 B (size_256) and 4 KiB (size_4096). Every
runner builds an opaque byte string of that length.
Catalog and defaults: schemas/data_catalog_v2.yaml. Run matrices: config/library/.
Compare queues within one language and one category. Cross-language
absolute times are directional only — runtimes and GCs differ.
Comparison rules:
no global winner, no broker next to deque-lock.
Every language writes the same columns (nanoseconds). Domain mapping:
| Column | Queue meaning |
|---|---|
LibraryName / LibraryVersion |
Implementation + installed version |
TimeEnq |
Enqueue ns |
TimeDeq |
Dequeue ns |
TimeHandoff |
Handoff ns |
Pattern |
bytes = 1P1C, 4p4c = 4P4C (stream is leftover 2P2C, not I/O) |
CpuTimeNs |
Process CPU time (spin vs block) |
See Metrics and architecture.
Authored by Leonid Ganeline