Benchmark

The benchmark compares AtomicChannel with Base.Channel using a multi-producer multi-consumer (MPMC) workload.

Method Summary

  • Benchmark target: put/take throughput with items=50000
  • Metric: speedup is computed as Channel ÷ AtomicChannel (elapsed time in ms).
  • Scenario groups:
    • Case 1: low-capacity contention (capacity=4 or 1)
    • Case 2: higher-capacity, lower data contention (capacity=256)
    • Case 3: varying worker/task counts (capacity=256)

Representative Results

Representative speedups are shown below from the latest report for each Julia version.

JuliaCase 1: 64 threads, 64 workers, cap=4Case 2: 32 threads, 32 workers, cap=256Case 3: 32 threads, 256 workers, cap=256
1.12.623.161x1.644x12.106x
1.11.912.383x2.399x1.811x
1.10.1122.519x2.810x1.800x
1.9.49.931x3.556x1.849x
1.8.52.622x1.551x1.737x

Notes:

  • Most tested scenarios are faster than Base.Channel.
  • Some scheduler/contention mixes can still fall below parity.

Raw Reports

Reproduce

Run from repository root:

julia --project benchmark/mpmc.jl

Or pin the Julia version with juliaup:

julia +1.8 --project benchmark/mpmc.jl
julia +1.9 --project benchmark/mpmc.jl
julia +1.10 --project benchmark/mpmc.jl
julia +1.11 --project benchmark/mpmc.jl
julia +1.12 --project benchmark/mpmc.jl

Each run generates a versioned report in benchmark/.