There is exactly one question you need to have in mind when optimizing a system in depth: “how can I not do this work at all?”

Using #Rust, #wasm, algorithms with nicer Big O, etc, are distractions compared to the simple fact that O(0) will beat them all.

So when you comb over a system, genuinely ask yourself why you’re doing something and what it would take to not do it at all, and only worry about alternative optimizations when you’ve exhausted all possibilities that involve skipping the work altogether.

This is probably very obvious when I say it like that, but people still neglect, on a regular basis, to do true deep dives into “why at all?” before they start reaching for cure optimizations. Every damn time.

@zkat I always think of GHC optimizing out an entire computation from a benchmark because the result was never printed to the screen.

https://www.reddit.com/r/programming/comments/25aej/why_the_great_language_shootout_changed_because/c25dmg/

Why the Great Language Shootout changed because Haskell was too fast

Posted in r/programming by u/ktr73 • 191 points and 81 comments

reddit
@zkat fast speed make my pp bigger
@js yes, more content for my PowerPoint