Re:Performance comparison: counting words in Python, C/C++, ...
by burntsushi on Monday July 25, 2022 @07:31PM
(#32232347)
I wrote the Rust version and the comments are a reflection of my style and my belief that benchmarks should come with some kind of analysis. The "simple" variant was also intended to demonstrate idiomatic code without a bunch of perf tricks. Nicer error messages in that case is fair game.
Indeed, a naively analysis based on code size without taking comments into account is pretty obviously wrong.
Indeed, a naively analysis based on code size without taking comments into account is pretty obviously wrong.