4 ms·
I'm sure Go is not better for every single use case. But it seems to be there were a lot of high performance systems that would have been written in C++, like I
by JamesBarney 6y ago
I'm sure Go is not better for every single use case. But it seems to be there were a lot of high performance systems that would have been written in C++, like InfluxDb for example that are clearly more reliable and easier to develop because it was written in Go.
Where do you think C++ outshines Go?
- jeffbee 6y agoI think that's an example of a system where the performance demands weren't high enough to justify using C++. There are lots and lots of applications where the overall architecture can't take advantage of the speed of C++, but I think there's no question that the peak performance of C++ far outshines the abilities of Go. Taking an example from the article, parts of Google's indexing pipeline are now in Go, but nobody is suggesting that the search engine would be.
- cdelsolar 6y agoGo is basically almost as fast as C++.
- jeffbee 6y agoAnd 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/...
- saagarjha 6y agoPerformance, as 'jeffbee mentioned, but it's also great for low-level systems programming, has multiple high-quality implementations, powerful compile-time features, and can interact particularly easily with mountains of already existing C and C++ code.