frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Show HN: An MPSC Queue Optimizing for Non-Uniform Bursts and Bulk Operations

https://github.com/dakingffo/MPSC_queue
3•dakingffo•12h ago
Hi HN,

I’m a C++ student and I’ve spent the last few months obsessing over concurrent data structures. I’m sharing daking::MPSC_queue, a header-only, lock-free, and unbounded MPSC queue designed to bridge the gap between linked-list flexibility and array-based throughput.

1. FACING THE CHALLENGE: THE "LINKED-LIST BOTTLENECK" In traditional MPSC linked-list queues, if multiple producers attempt to enqueue single elements at a high, uniform frequency, the resulting CAS contention causes severe Cache Line Bouncing. In these saturated uniform-load scenarios, throughput hits a physical "floor" that often underperforms compared to pre-allocated ring buffers.

2. ARCHITECTURAL SOLUTIONS FOR REAL-WORLD SCENARIOS Rather than focusing on average throughput under uniform load, this design targets two specific real-world challenges:

Scenario A: Non-Uniform Contention (Burst Resilience) In many systems, producers are mostly idle but burst occasionally. By facilitating a high-speed lifecycle where node chunks circulate from Consumer (Recycle) -> Global Stack -> Producer (Allocate) with strictly O(1) complexity, the queue can rapidly establish SPSClike performance during a burst, peaking at ~161M/s.

Scenario B: Bulk Contention Reduction The enqueue_bulk interface allows producers to pre-link an entire segment in private memory. This reduces the contention from N atomic operations down to a single atomic exchange. The larger the batch, the lower the contention.

3. IMPLICIT CHUNKING & RESOURCE LIFECYCLE Instead of fragmented allocations, memory is managed via a Page -> Chunk -> Node hierarchy.

Implicit Composition: Unlike chunked-arrays, nodes are not stored in contiguous arrays but are freely combined into logical "chunks." This maintains linked-list flexibility while gaining the management efficiency of blocks.

Zero-Cost Elasticity: The unbounded design eliminates backpressure stalls or data loss during traffic spikes, with heap allocation frequency reduced to log(N).

4. ENGINEERING RIGOR * Safety: Fully audited with ThreadSanitizer (TSAN) and ASAN. * Type Safety: Supports non-default-constructible types; noexcept is automatically deduced. * Lightweight: Zero-dependency, header-only, and compatible with C++17/20.

A NOTE ON BENCHMARKS: In the interest of full transparency, I’ve benchmarked this against moodycamel::ConcurrentQueue. In highly uniform, small-grain contention scenarios, our implementation is slightly slower. However, daking::MPSC_queue provides a 3x-4x performance leap in non-uniform bursts and bulk-transfer scenarios where "Zero-Cost Elasticity" and contention reduction are the primary goals.

I’d love to hear your thoughts on this repository!

GitHub: https://github.com/dakingffo/MPSC_queue

Show HN: Narrativee – Make sense of your data in minutes

https://narrativee.com
2•safoan_eth•29m ago•0 comments

Show HN: Paper2Any – Open tool to generate editable PPTs from research papers

https://github.com/OpenDCAI/DataFlow-Agent
9•Mey0320•3h ago•1 comments

Show HN: Spice Cayenne – SQL acceleration built on Vortex

https://spice.ai/blog/introducing-spice-cayenne-data-accelerator
17•lukekim•1h ago•2 comments

Show HN: TinyPDF – 3KB PDF library (70x smaller than jsPDF)

https://github.com/Lulzx/tinypdf
3•lulzx•1h ago•0 comments

Show HN: A local-first memory store for LLM agents (SQLite)

https://github.com/CaviraOSS/OpenMemory
36•nullure•4d ago•16 comments

Show HN: Explore Prometheus /metrics endpoints from your terminal

https://github.com/brennerm/slashmetrics-cli
2•brennerm•1h ago•0 comments

Show HN: Turn your startup logo into a holiday Google doodle

https://doodle.logic.inc/
3•sgk284•2h ago•1 comments

Show HN: I built a fast RSS reader in Zig

https://github.com/superstarryeyes/hys
89•superstarryeyes•2d ago•31 comments

Show HN: Git rewind – your Git year in review

https://gitrewind.dev/
4•thijser•3h ago•0 comments

Show HN: Toad. A unified terminal UI for coding agents

https://github.com/batrachianai/toad
5•willm•3h ago•0 comments

Show HN: MiraTTS, a 48kHz Open-Source TTS at 100x Real-Time Speed

https://github.com/ysharma3501/MiraTTS
2•Yatharth3501•3h ago•0 comments

Show HN: Composify – Open-Source Visual Editor / Server-Driven UI for React

https://github.com/composify-js/composify
41•injung•4h ago•1 comments

Show HN: High-Performance Wavelet Matrix for Python, Implemented in Rust

https://pypi.org/project/wavelet-matrix/
90•math-hiyoko•1d ago•9 comments

Show HN: Open database tracking 77K public DNS servers every 10 minutes

https://dnsdirectory.com/
6•timatping•4h ago•4 comments

Show HN: Ai3 – An experimental agentic tiling window manager (i3 fork)

https://github.com/aymenfurter/ai3
4•aymenfurter•4h ago•1 comments

Show HN: DocsRouter – The OpenRouter for OCR and Vision Models

https://docsrouter.com
9•misbahsy•12h ago•0 comments

Show HN: Generate Schema.org Markup for Right to Repair and DPP Compliance

https://tools.verisav.fr/tools/dpp-compliance-checker
2•Kevin_Bouti•5h ago•0 comments

Show HN: DIY E-Ink Home Dashboard Without Headless Chrome (Python/Pillow)

https://tjoskar.dev/posts/2025-11-02-eink-pi/
2•tjoskar•6h ago•0 comments

Show HN: Sqlit – A lazygit-style TUI for SQL databases

https://github.com/Maxteabag/sqlit
178•MaxTeabag•3d ago•40 comments

Show HN: I built an app for vibe-coding games

https://playmix.ai/
3•Mikecraft•7h ago•0 comments

Show HN: I built an Animated UI Library with drag and drop components

https://ogblocks.dev/
2•ogsome•9h ago•0 comments

Show HN: Interactive Common Lisp: An Enhanced REPL

https://github.com/atgreen/icl
101•atgreen•4d ago•6 comments

Show HN: GitForms – Zero-cost contact forms using GitHub Issues as database

https://gitforms-landing.vercel.app/
39•lgreco•1d ago•26 comments

Show HN: Map of median rent per m² in Berlin

https://allaboutberlin.com/tools/rent-map
3•nicbou•10h ago•0 comments

Show HN: Minimal DL library in C – 24 NAIVE CUDA/CPU ops, autodiff, Python API

https://github.com/IaroslavElistratov/ml-systems-course
13•iaroo•23h ago•1 comments

Show HN: GPT Clicker. An idle game about building an AI empire

https://gpt-clicker.pixdeo.com
2•mromanuk•3h ago•0 comments

Show HN: Muxide – Zero-dep pure Rust MP4 muxer (H.264/H.265/AV1, no FFmpeg)

https://github.com/Michael-A-Kuykendall/muxide
8•MKuykendall•20h ago•1 comments

Show HN: TheAuditor v2.0 – A “Flight Computer” for AI Coding Agents

https://github.com/TheAuditorTool/Auditor
37•ThailandJohn•2d ago•11 comments

Show HN: A pager

https://www.udp7777.com/
103•keepamovin•4d ago•43 comments

Show HN: An MPSC Queue Optimizing for Non-Uniform Bursts and Bulk Operations

https://github.com/dakingffo/MPSC_queue
3•dakingffo•12h ago•0 comments