Oh, my GoD! Goroutines on D
Derek Fawcus
dfawcus+dlang at employees.org
Sat Jan 4 13:52:44 UTC 2025
While having a CSP style mechanism, with cheap stackful
tasks/procs/coroutines and channels has merit, pursing a
performance test with a 1000 (or more) trivial instances of such
tasks seems misguided.
In the last couple of years, I used Go to design and implement a
subsystem as a process using CSP style, and many goroutines.
Even there I only had on the order of 20 - 40 goroutines present
at once. Then possibly around 4-8 additional goroutines for each
simultaneous client service I was performing.
Now it may have been theoretically possible to cause that to
spawn on the order of 64k goroutines if stressed the "correct"
way in an absurd deployment. That would be improbable, and a max
of around 500 would be more likely, even there performance was
gated upon Internet RTTs.
I'll have to re-read the code next week to get the actual number,
but I expect it would be of that order of 30 or so.
More information about the Digitalmars-d
mailing list