2 ms·
And cat food is "basically" pâté. The Go toolchain lacks virtually all of the optimizations that a C++ compiler would employ in an optimized build and the Go to
by jeffbee 6y ago
And cat food is "basically" pâté. The Go toolchain lacks virtually all of the optimizations that a C++ compiler would employ in an optimized build and the Go toolchain also lacks all of the ways you'd achieve peak optimization for C++, such as profile-guided optimization and link-time interprocedural optimization.
These programs are are not even peak optimized but the C++ version still wins every case by between 10% and 1000%.
https://benchmarksgame-team.pages.debian.net/benchmarksgame/fastest/go-gpp.html https://benchmarksgame-team.pages.debian.net/benchmarksgame/...