nowfound

Life & fun · February 3, 2026

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.

Visit github.com ↗Alternativestop 3% of February 2026

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 · ▲145

    Concurrency 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 · ▲39

    Single 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 · ▲49

    A 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 · ▲88

    If 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 · ▲150

    Pure C implementation of Go channels. Contribute to tylertreat/chan development by creating an account on GitHub.

More life & fun this month

the category →

Source: Show HN post ↗ · launch text quoted in part

Launched alongside, February 2026

the whole month →
  • Rork Max▲1,428

    Best AI for iOS apps. Website that replaces Xcode

    Life & fun · Feb 2026 · rork.com

  • happycapy▲1,365

    The agent-native computer, for the rest of us

    AI · Feb 2026 · happycapy.ai

  • SuperX▲897

    All-in-one growth OS for serious 𝕏 creators

    AI · Feb 2026 · superx.so

  • KiloClaw▲868

    Hosted OpenClaw. No Mac mini required.

    Dev tools · Feb 2026 · kilo.ai

  • Feel 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