docs / benchmarks / concurrent
Benchmarks index
aot
codec
codec / csv
codec / json
collection
- Overview
- ArrayList
- BPlusTree
- Cache
- Collectors
- HashMap
- HashSet
- Heap
- ImmutableList
- ImmutableMap
- ImmutableSet
- LinkedList
- RedBlackTree
- Sort
collection / ltm
concurrent
gfx
hash
http
io
io / file
io / net
io / net / uri
lang
- Overview
- Allocation and ownership
- Calls and dispatch
- Exceptions
- Guid
- Loops
- Math and SIMD
- Optional
- Pair
- Slice
- String
- StringBuilder
- Whole programs: the Benchmarks Game
lang / stream
llm
math
math / fft
math / linalg
math / npio
math / poly
math / random
math / stats
ml
nucleo
primavera
process
reflect
search
search / distance
search / fuzzy
search / ngram
time
toolchain
toolchain / kernel-startup
wire
xpu
xpu / mesh
Tasks
cajeta.concurrent.Tasks — task utilities: spawn and await. Fibers are stackful, so spawn cost and the footprint of a million parked tasks are the two numbers that place the runtime beside goroutines and virtual threads.
Benchmarks
| id | workload | against | check |
|---|---|---|---|
concurrent/task-spawn-await | spawn and await 1e5 trivial tasks, sequentially | C++ std::async, Rust tokio spawn, Go go + channel, Java virtual threads, Python asyncio | count |
concurrent/tasks-1m-footprint | park 1e6 tasks, spawned in steps of 1024, on 1000 channels of 1000 waiters; the row is resident memory and bytes per task | Rust tokio, Go, Java virtual threads, Python asyncio | count |
The footprint row skips with a reason under 16 GB free, and on a box whose vm.max_map_count is below 2 × N + 65536: a fiber is two mappings today (guard page and stack), so Phoenix’s default 1,048,576 caps parked fibers near 520k. The carrier run deque is 2048 slots and aborts on overflow, which is why spawns are paced.
Results
One chart per benchmark, for the machine selected at the top of the page. Languages are the bars, best first; Cajeta’s bar is in color and the competitors’ are gray. A skipped competitor keeps its row with the reason in place of a bar. A benchmark with no row on the selected machine says so and shows nothing else.
Not yet measured on Proton.
Not yet measured on Proton.
Reproduce
cd bench
./bench.sh --bench task-spawn-await # Cajeta
./bench.sh --bench task-spawn-await --competitors # every pinned competitor
Every row records the compiler and competitor versions, flags, machine, OS and driver; METHODOLOGY states the rules a number must satisfy before it is published.
See also
- Reference: Tasks
- Source:
runtime/src/cajeta/concurrent/Tasks.cajeta - Benchmark source:
bench/src/main/cajeta/bench/concurrent/