3 ms·
It's pretty heavy compared to C and C++, not .NET or JVM. The point is that Go, even if AOT compiled, is much nearer to .NET and JVM (and often slower than tho
by simiones 5y ago
It's pretty heavy compared to C and C++, not .NET or JVM.
The point is that Go, even if AOT compiled, is much nearer to .NET and JVM (and often slower than those two) than to C or C++.
To make that least clearer: it's generally slower than C or C++ because the compiler is not doing very advanced optimizations, the runtime is significantly heavier than them, and GC use has certain unavoidable costs for certain workloads.
Go is generally slower than .NET or Java because its AOT compiler is not as advanced as their JIT compilers, it's GC is not tunable and it's a much more primitive design, and certain common Go patterns are known to sacrifice speed for ease of use (particularly channels).