Hacker News new | past | comments | ask | show | jobs | submit login

The article is missing benchmarks. Less instructions != faster execution.



Not really, the author's are bench marking on different parameters to yours. His is size and yours is speed.


Normally it is


Except if the algorithm is changed. On 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.


How many instructions is an infinite loop :p More seriously, processors are superscalar and can execute out of order.


In Intel, basically one.


Not at all true. Especially with SIMD-type instructions. Lots of verbosity and boilerplate. But the perf is undeniable.


Allen's original paper includes loop unrolling as a useful optimization even in the 70s, and there can be good reason for inlining.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: