Virtual Threads performance
Attila Kelemen
attila.kelemen85 at gmail.com
Sat Apr 1 20:00:19 UTC 2023
Hi,
I bumped into this article (actually a while ago, but only now did I
start to experiment with the performance myself):
https://apiumhub.com/tech-blog-barcelona/project-loom-and-kotlin-some-experiments
comparing Kotlin coroutines vs. virtual threads.
Though I don't think the article itself is a fair measure of Loom's
performance (given that most applications do not involve 100k threads
sleeping as their main purpose). Especially because when I did a
comparison with tasks actually doing some CPU work, then the results
were way in favor of Loom.
Still, I find it strange that Kotlin coroutines can heavily outperform
Loom in the case when there is almost nothing but waiting (especially
in the case of timed waiting). Can anyone shed a light on why this can
happen? Is this because of a particular trade-off choice?
Attila
More information about the jdk-dev
mailing list