TGViewer
C++ - Reddit C++ - Reddit @r_cpp · 230 subscribers
Post #24939 23
Orbit - a fast lock-free MPMC queue in C++20

Orbit is a single-header lock-free MPMC bounded queue, designed from first principles and tuned to get the most out of modern hardware. In my benchmarks, it consistently outperforms other implementations like atomic_queue, moodycamel::concurrent_queue or xenium::ramalhete_queue on both x86 and ARM, often by a significant margin.

## Key features

- Cross-platform: Support for x86/ARM, GCC/Clang/MSVC
- Supports any default-constructible type, not just atomics, with move semantics for non-trivially-copyable types
- Configurable to optimise for either latency or throughput
- Simple and versatile interface
- Easily tunable spin pause lengths for different platforms

I wrote a technical blog post covering the implementation details and optimisation process if you are interested.

https://redd.it/1sfqu2h
@r_cpp
GitHub GitHub - austin-hill/orbit: Very fast lock-free MPMC circular queue in C++20 Very fast lock-free MPMC circular queue in C++20. Contribute to austin-hill/orbit development by creating an account on GitHub.
More from @r_cpp
  1. Oct 6, 2026Why do people on Windows mostly choose Visual Studio? https://redd.it/1weku08 @r_cpp
  2. Oct 6, 2026Jonas Persson: Making every byte count https://youtu.be/GbwrztrY4kc https://redd.it/1wf1l3…
  3. Oct 6, 2026It annoys me that coroutines are described as "functions that can be suspended" Any functi…
  4. Oct 6, 2026==2896379== logger no timeout configured, using default 1000 ms ==2896379== ==2896379== HE…
  5. Oct 6, 2026No, -Wall -Werror Does Not Guarantee Detection of Conditionally Uninitialized Local Variab…
  6. Oct 6, 2026C++20 modules support: 228 projects already available to be consumed Hello everyone. I che…
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook →Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 →