Kotlin(-Native) as a Go alternative in 2021

@broot @darksnake
The assumption is based on the benchmarks which I’ve read before writing this post. I have linked some of them below. They show that Go has a slightly better performance in synthetic benchmarks and a better one in application benchmarks (e.g. http api). The memory usage of the jvm is a lot higher throughout basically all benchmarks, even when considering the 40-80 MB required for the JVM.

a) Go vs Java - Which programs are fastest?
b) Go VS Kotlin benchmarks, Which programming language or compiler is faster
c) Server-side I/O: Node vs. PHP vs. Java vs. Go | Toptal
d) Kotlin http4k (via GraalVM Native Image) and Golang | Lambros Petrou

The cost calculation was based on the peak of the benchmarks, thus up to 70%. My way of thinking was the following: If Golang can handle twice the amount of requests using 1/8 the memory, then you’ll need half the cores and 1/8 of the memory. But of course this is only true if the benchmarks are correct. Thus my question, how would you suggest to measure it? Do you know any more accurate benchmarks?

1 Like