How much faster is Go now than in the past? Release notes give the results of small tests. Most blog posts compare only two releases. We wanted the full history. Thus, we used the same programs and the same source code on each Go release from 1.2 to 1.27. We measured all of them on one machine.
Summary:
Go 1.27 is 11.5% faster than Go 1.23. It is approximately 41% faster than Go 1.2. Most of the improvement occurred in two periods. The first period is go1.5 to go1.7, when the compiler changed. The second period is go1.24 to go1.27, when the runtime changed. binary-trees is a test of the garbage collector (GC). With pre-allocated nodes, the program is approximately 10× faster. This speed is approximately equal to C.* Energy use follows elapsed time. Go 1.27 uses 11.5% less energy than Go 1.23. In a 2017 study by Pereira et al., Go used 3.23× the energy of C. With go1.27, this value is approximately 2.25×. With pre-allocated binary-trees, the value is approximately 1.57×.* Most of the difference between Go and C comes from SIMD instructions. Against the fastest C programs without SIMD, Go takes 0–30% more time on these tasks. ...