3 ms·
That's a very intriguing metaphor.. and reminds me of the optimization manually vs using `gcc -O2` .. I am wondering if the "pre-mature optimization is the root
by nandhinianand 5y ago
That's a very intriguing metaphor.. and reminds me of the optimization manually vs using `gcc -O2` .. I am wondering if the "pre-mature optimization is the root of evil" quote applies here and we should all just use async first and only go for threaded/multi-processing programming if there seems to be a performance issue for the business application.
- dodobirdlord 5y agoIt’s probably very painful to try to convert a piece of async software to use a threaded model (though I’m just guessing, having never had to attempt this), so I’d say it’s more a matter of thinking up front about whether you need to control threads directly. But to your main point, I agree. I suspect the vast majority of software has no need for thread-model parallelism, and languages have only historically presented that parallelism model because it’s the model that the OS exposes to userland, even though the OS scheduler is async-style scheduling the machine threads themselves!
- Nullabillity 5y agoYou might not even need to do that, most async runtimes support some kind of middle ground where you take explicit control over which tasks are scheduled to which threads.