Back to browse
GitHub Repository

Lockless, thread-safe single-producer single-consumer FIFO queue for Python — implemented on a ring buffer in C.

1 starsPython

Spsc-ring-threadsafe Python C ext. 100x faster as multiprocessing.Queue

by eliasdejong·Jul 27, 2026·1 point·0 comments

AI Analysis

●●●BangerWizardryBig BrainSolve My Problem

Lockless C11 ring buffer delivering 100x speedup over Python's multiprocessing.Queue.

Strengths
  • C11 atomic acquire/release ordering eliminates mutex contention between producer and consumer.
  • Direct shared memory support enables zero-copy IPC between separate Python processes.
  • Compatible with no-GIL Python and subinterpreters for future-proof concurrency models.
Weaknesses
  • Strictly single-producer single-consumer, limiting applicability to multi-worker scenarios.
  • Requires manual buffer management and power-of-two sizing constraints for initialization.
Target Audience

Python developers building high-performance concurrent or multiprocessing applications

Similar To

multiprocessing.Queue · py-spssc · mpqueue

Similar Projects

AI/ML●●●Banger

Crforest – Competing-risks RSF in Python, 6× faster than R's rfSRC

Native Python competing-risks RSF that's 6x faster than R's randomForestSrc.

Niche GemSolve My Problem
sunnyadn
102mo ago