4 ms·
I understand what you're saying. However if you look at it not from the point of the performance figures per se, but rather which language, when written idiomat
by kitd 4y ago
I understand what you're saying. However if you look at it not from the point of the performance figures per se, but rather which language, when written idiomatically, can solve a realistic problem performantly, then I think it makes more sense.
- HarHarVeryFunny 4y agoTrue - there's still value in these types of comparison, although the click-baity "C++ vs Python" title rather detracts from that. I'm not sure how much value there is in this specific benchmark though since in the real world you'd be using a utility to do this (e.g. linux wc - word count) and it's not obvious what's dominating the runtime (I'd guess reading file and/or splitting into words), so what you're takeaway should be (idiomatic X is good for what, exactly?) if wanting to extrapolate this to some other task. For that matter, in the real world people don't really choose language on a task specific basis... It's either use language X because the project demands it, or write some limited use utility in a scripting language if performance isn't a major concern.