3 ms·
Really interesting article. For me this was an important takeaway: >Although it should fail gracefully, it does not need to be optimised for failure.
by apocalypses 6y ago
Really interesting article. For me this was an important takeaway:
>Although it should fail gracefully, it does not need to be optimised for failure.
- LorenPechtel 6y ago99% of your code doesn't need optimization, period. If it's not inside at least two loops it almost certainly doesn't meaningfully contribute to the total runtime.
- AstralStorm 6y agoExcept the one case where you have a slow approach diffused over a whole application, when all of the code needs an optimization. That case is easy to hit with compilers or annotation and such features. It is still one thing to optimize but impact is typically big.
- nwellnhof 6y agoThat's only true for application code. If you write libraries, you can't know how your library functions will be called and have to assume that most of them could end up in performance-critical code paths.