C discrete event SIM w stackful coroutines runs 45x faster than SimPy
Hi all, I have built Cimba, a multithreaded discrete event simulation library in C. Cimba uses POSIX pthread multithreading for parallel execution of multiple simulation trials, while coroutines provide concurrency inside each simulated trial universe. The simulated processes are based on asymmetric stackful coroutines with the context switching hand-coded in assembly. The stackful coroutines make it natural to express agentic behavior by conceptually placing oneself "inside" that process and describing what it does. A process can run in an infinite loop or just act as a one-shot customer…
C discrete event SIM w stackful coroutines runs 45x faster than SimPy launched on February 3, 2026 with 69 votes, #529 of 16,627 launches that month and more than 95% of that year's launches.
In plain words
Cimba is a discrete event simulation library written in C that combines POSIX multithreading for parallel trial execution with stackful coroutines for concurrency within each simulation. Processes use asymmetric coroutines with assembly-level context switching, allowing developers to describe agent behavior intuitively from within the process perspective. Processes can run continuously or execute once, yielding and resuming from any call stack depth to act as both active agents and passive objects.
written from the facts on this page · September 2026
From the sources
A multithreaded discrete event simulation library in C, using POSIX pthreads for parallelized trials and replications, stackful asymmetric coroutines for concurrent simulated processes inside each thread, and optionally CUDA or other GP GPU parallelism for detailed model physics inside each coroutine. - ambonvik/cimba
In the maker’s words, at launch
Hi all, I have built Cimba, a multithreaded discrete event simulation library in C. Cimba uses POSIX pthread multithreading for parallel execution of multiple simulation trials, while coroutines provide concurrency inside each simulated trial universe. The simulated processes are based on asymmetric stackful…
Does a similar job
all alternatives →
Neco – Coroutine Library for C2024 · github.com · ▲145Concurrency library for C (coroutines). Contribute to tidwall/neco development by creating an account on GitHub.
Asymmetric stackful cross-platform Coroutines in pure C2021 · github.com · ▲39Single header stackful cross-platform coroutine library in pure C. - edubart/minicoro
Libconcurrent – Coroutines in C2016 · github.com · ▲91:copyright: Concurrent Programming Library (Coroutine) for C11 - sharow/libconcurrent
I made a zero-copy coroutine tracer to find my scheduler's lost wakeupsMar 2026 · github.com · ▲49A cross-language, zero-copy coroutine observability framework based on the cTP shared-memory protocol, utilizing lock-free ring buffers for ultra-low overhead state tracing. - lixiasky-back/coroTracer
Comprehensive inter-process communication (IPC) toolkit in modern C++2024 · github.com · ▲88If you work in C++, and you would like 2+ programs to share data structures (and/or native I/O handles a.k.a. FDs) among each other, there is a good chance Flow-IPC - will make it considerably less annoying to code than typical approaches; and - may massively reduce the latency involved. Those sharing Cap'n Proto-encoded data may have particular interest. Cap'n Proto (https://capnproto.org) is fantastic at its core task - in-place serialization with zero-copy - and we wanted to make the IPC (inter-process communication) involving capnp-serialized messages be zero-copy,…
Chan – pure C implementation of Go channels2014 · github.com · ▲150Pure C implementation of Go channels. Contribute to tylertreat/chan development by creating an account on GitHub.
More life & fun this month
the category →
A free city-building game in your browser. You are the mayor. You know what the city needs. Now get it past the zoning board, the neighbors, the appeals court and the next election.
Life & fun · 3d ago · permit.petercai.com
- IV
Life & fun · 15d ago · tanzaniaeducationproject.org

Turn a phone, tablet or TV into a sign. Type a message and it fills the screen: welcome signs, timers, Wi-Fi passwords and more. No app, no account, free.
Life & fun · 16d ago · bigwords.page

Play a free virtual guitar online with your keyboard or by touch. Slow songs down and see every chord, string and strum. Acoustic, classic, electric and bass.
Life & fun · 10d ago · guitoro.com

Carrier settings from iPhone, Pixel and Galaxy firmware, decoded and compared: APNs, VoLTE, 5G and Wi-Fi Calling per carrier, and what each build changed.
Life & fun · 14d ago · carrierexplode.com

Life & fun · 24d ago · space.bl2.net
Source: Show HN post ↗ · launch text quoted in part
Launched alongside, February 2026
the whole month →



Lovon AI Therapy▲801Feel closer and have more fun with your partner every day!
AI · Feb 2026 · lovon.app

Hello my name is Ben Ward for the past 3 years I have been remastering the financial game Wall Street Raider created by Michael Jenkins originally on DOS in 1986. It has been a rough journey but I finally see the light at the end of the tunnel. I just recently redid the website and thought maybe the full story of how this project came to be would interest you all. Thank you for reading.
Work · Feb 2026 · wallstreetraider.com