Re:Kotlin Coroutines vs. Threads Performance Benchmark
by zekrioca on Saturday October 28, 2023 @01:06AM
(#38047305)
There aren’t numbers in your reference, just a set of recommendations. The author of the post tried to compare the performance overheads of using Coroutines over threads, that’s all.
Re:Kotlin Coroutines vs. Threads Performance Benchmark
by asdfaoeu on Saturday October 28, 2023 @01:16AM
(#38047356)
The issue with OPs is that it's really a case where coroutines would have any advantage so it's kind of pointless.
Re:Kotlin Coroutines vs. Threads Performance Benchmark
by zekrioca on Saturday October 28, 2023 @02:17AM
(#38047591)
I agree OP could have been more elaborate, but the main takeaway is that goroutines still cost at least 50% that of normal threads (though this needs to be verified in normal servers as well, not just smartphones). With goroutines, though usually supported by runtime systems (e.g., in Go), applications are responsible to manage tasks (e.g., HTTP requests) in order to harvest goroutines benefits, whereas this is easier with threads.
Edited for clarification.
Re:Kotlin Coroutines vs. Threads Performance Benchmark
by otabdeveloper4 on Saturday October 28, 2023 @04:57AM
(#38048274)
What, you mean using threads doesn't automatically make your machine slow to a crawl because of le ""context switches""??
Heresy! But my async!
[0] https://kt.academy/article/cc-best-practices