https://kotlinlang.org logo
Title
a

altavir

12/17/2021, 8:38 PM
Some interesting benchmarks: https://discuss.kotlinlang.org/t/kotlin-native-as-a-go-alternative-in-2021/23665/8?u=darksnake. I guess that the problem is that he uses very small messages and buffers are not filled.
t

Tomasz Krakowiak

12/18/2021, 2:31 PM
Do you think it might be because of indirection layers, that JIT may not able to finely optimize? According to this benchmark Netty is quite comperable to go - https://stressgrid.com/blog/webserver_benchmark/ (also benchmark of serving static content)
a

altavir

12/18/2021, 2:32 PM
It is a good question to ktor developers. I also think, it should be the same in general. But IO operations should be heavier than the overhead from not best optimization.
t

Tomasz Krakowiak

12/18/2021, 2:38 PM
I would expect that, the larger the buffers(and transferred files), the less it matters. Also you mentioned few kb buffer size... than probably it's less of a buffer than OS can handle, resulting in higher syscalls frequency.