Queue categories
Compare libraries inside one language and one communication category. Implementation family is a label, not a separate leaderboard.
See Benchmark design for tests and metrics.
Published: communication model
| ID | Category | What it is | In this repo |
|---|---|---|---|
| T | Thread / in-process | OS threads, one process | locked, concurrent, spsc-ring, work-stealing |
| A | Async / event-loop | Tasks on one loop | asyncio.Queue, Channel, tokio-mpsc |
A locked deque and an async channel answer different questions. Do not rank them against each other.
T — families (sub-labels)
| Family | What it is | Example |
|---|---|---|
| locked | Mutex around a stdlib queue. Baseline. | Python deque-lock, C# Queue+lock, JS Array, C mutex-queue |
| concurrent | Thread-safe MPSC/MPMC | Python queue.Queue / queue.SimpleQueue, C# ConcurrentQueue, Rust crossbeam-channel, JS fastq |
| spsc | Single-producer ring (no mutex on the happy path) | C spsc-ring, Python spsc-ring |
| work-stealing | Owner-push / steal-from-the-other-end | Python steal-deque, Rust crossbeam-deque, C# / C / JS steal-deque |
A — async
The runtime’s own queue: Python asyncio.Queue, C# Channel, Rust
tokio::sync::mpsc. Python also has janus (async face only).
JavaScript p-queue is a concurrency limiter (scheduler), not a
handoff queue. It is listed in the inventory; do not treat it as category A
for ranking.
Published as opt-in: P / S / D
pipe-ipc, shared-ring, and sqlite-queue exist in C, C#, JS, Python,
and Rust. They are off the default matrix unless
BENCHMARK_INCLUDE_PSD=1. They never share a violin or rank table with T.
The dashboard Category filter includes Thread / Async / Process / Shared /
Durable / Other.
| ID | Category | Why it is different | First tests |
|---|---|---|---|
| P | Process / IPC | Serialization and OS pipes dominate | Experiment 10 — true two-process multiprocessing.Queue |
| S | Shared memory | Same topology as P, different data path | Experiment 11 — two-process mapped ring |
| D | Durable / local disk | fsync / WAL, not coordination primitives | Experiment 12 — SQLite local queue |
| N | Local broker | Client + localhost server — a system bench | Not this lab. Separate report, labeled “localhost” |
Brokers (Redis, Kafka, ZeroMQ) stay out of T/A charts.
The dashboard Category control filters the current language’s table
to Thread (T), Async (A), Process, Shared, Durable, or Other
(p-queue). P/S/D series appear after an opt-in run.
Not categories
These are properties that can apply inside T or A:
- bounded vs unbounded (backpressure)
- FIFO vs priority
- blocking vs spin vs yield
- 1P1C vs 4P4C (workload / pattern)
Patterns
| Say | CSV Pattern |
Work |
|---|---|---|
| 1P1C | bytes |
1 producer, 1 consumer |
| 4P4C | 4p4c |
4 producers, 4 consumers |
| 2P2C | stream |
2 producers, 2 consumers (old logs / experiment 3) |
| 1P4C / 4P1C | 1p4c / 4p1c |
Experiment 3 only |
Logged values bytes / stream / 4p4c are pattern tags, not I/O.