4 ms·
I've seen C++ based systems that regularly harbor hundreds of thousands of stacks using quite minimal heap, 2M+ stacks when things get really busy (this, on a m
by kabdib 7y ago
I've seen C++ based systems that regularly harbor hundreds of thousands of stacks using quite minimal heap, 2M+ stacks when things get really busy (this, on a machine with 64GB of RAM). The primitives are a few hundred lines of pretty tame C++.
As much as I like Erlang/Go/Rust/etc., it's not a requirement.
- cbetti 7y agoHow quickly could the process perform a simple operation, say compare or move, across all 2m+ stacks? I.e. how long is the latest stack frozen before it is given an opportunity to work?
- lossolo 7y agoCheck out libdill[1] (in C): "Generally speaking, though, libdill's concurrency primitives are only a bit slower than basic C flow control statements. A context switch has been seen to execute in as little as 6 ns, with coroutine creation taking 26 ns. Passing a message through a channel takes about 40 ns." Check also libmill[2] (from the same author), it's more Go'ish: "It can execute up to 20 million coroutines and 50 million context switches per second." 1. http://libdill.org http://libdill.org 2. http://libmill.org http://libmill.org