Understanding the Go Runtime: The Bootstrap
12 points by runxiyu
12 points by runxiyu
Regarding the timing of the empty programs, I know that it mainly serves as a way to introduce the subject but regular time is not a good tool for this measurement, the 1ms granularity is not sufficient. Something like "hyperfine -N" would be more appropriate. On my crummy Linux desktop both empty programs run well under 1ms.
If we really want to dig into these minuscule differences the C version should be statically linked since loading the shared libc is relatively expensive. Examining the syscalls involved would be worthwhile in general since those could turn out to be more expensive than the user space computation. The choice of the host OS could be a significant factor too.