5 ms·
https://kidoman.com/images/go-vs-cpp-after-both-optimized.png https://kidoman.com/images/go-vs-cpp-after-both-optimized.pn... In this picture - am I right in i
by eliasmacpherson 13y ago
https://kidoman.com/images/go-vs-cpp-after-both-optimized.png https://kidoman.com/images/go-vs-cpp-after-both-optimized.pn...
In this picture - am I right in interpreting it at 2048x2048 and 8 cores, that the optimised and tuned go code is nearly three times faster than the multithreaded optimised and tuned C++ code? How come the C++ is the same for 1C and 8C? Is this picture from one of the previous articles?
EDIT: (No, I'm wrong, the C++ is single threaded!)
It seems it's single threaded - and the last graph isn't showing the current level of C++ single threaded performance - which is ~36 seconds, with go at 21s for 8 threads. Final state of play is go at 18s multithreaded and C++ at 8s multithread and go at 81s single threaded and C++ at 36s single threaded. I read that from the third last graph.
It's difficult to understand this ending of the article, as the subtitle is:
"Further optimizations and a multi-threaded C++ version"
and
"Hurray multi-threading"
I suggest the order of the article be changed around to have a 'recap on single threaded C++' at the start, and then the new figures - so that it concludes in straightforward manner.
This quote from the article is wrong:
"C++ is not more than twice as fast than an equivalent Go program at this stage."
Correct me if I'm wrong, but in every case that I can see the C++ code will execute twice before the Go code is finished. It is more than twice as fast.
By the same logic this "almost" is also wrong: "From taking 58.15 seconds (single threaded), it has now dropped to a extremely impressive 36.36 seconds (again single threaded), making it almost twice as fast as the optimized Go version."
36s < 81s/2
- vanderZwan 13y ago"C++ is not more than twice as fast than an equivalent Go program at this stage." I believe that is a simple typo, where 'not' was meant to be a 'now'.
- eliasmacpherson 13y agoInitially I thought that, but I can't explain the 'almost' that follows? also it would be idiomatic to say "now more than twice as fast as" instead of "now more than twice as fast than".
- kid0m4n 13y agoThe god of all typos has been fixed :)
- eliasmacpherson 13y agoWell done, you should probably change the "almost" I pointed out to "more than" also.