Re:Random Acts of Optimization
by johncolanduoni on Thursday October 29, 2015 @06:14PM
(#10474754)
You're absolutely right, I chose a simple example because it's one I expect most people have seen in one language or another. A better one would be rewriting a combinator based parser (e.g. one written in Parsec) into an imperative one.
[ Parent
| on HN ]
Re:Random Acts of Optimization
by lunchTime42 on Thursday October 29, 2015 @06:46PM
(#10474942)
Dont you cave in blindly believing into the infoscience gods of old having done good.
Demand profile logs, demand numbers, demand evidence.
Compilers do the most utterly unexpected nonsense, forget the most trivial optimisations.
Take your code to
https://gcc.godbolt.org/
and read what your "Compiler-knows-best" does with your code.
yes, it doesent matter often in the end, cause even bad code must wait for worser memory, but still..