6 ms·
The article is missing benchmarks. Less instructions != faster execution.
by andreaorru 6y ago
The article is missing benchmarks. Less instructions != faster execution.
- rurban 6y agoNormally it is
- tomsmeding 6y agoExcept if the algorithm is changed. On https://codegolf.stackexchange.com https://codegolf.stackexchange.com there are regularly solutions that are very short, but by necessity also employ a suboptimal algorithm, and are thus slower (sometimes very much slower) than the optimal program in terms of performance.
- Google234 6y agoHow many instructions is an infinite loop :p More seriously, processors are superscalar and can execute out of order.
- saagarjha 6y agoIn Intel, basically one.
- snicker7 6y agoNot at all true. Especially with SIMD-type instructions. Lots of verbosity and boilerplate. But the perf is undeniable.
- gnufx 6y agoAllen's original paper includes loop unrolling as a useful optimization even in the 70s, and there can be good reason for inlining.
- yitchelle 6y agoNot really, the author's are bench marking on different parameters to yours. His is size and yours is speed.