19 ms·
> The hard part is knowing what "stupidly inefficient things" are. There are things that are quite obvious non-critical in terms of performance. One time I ha
by simplotek 3y ago
> The hard part is knowing what "stupidly inefficient things" are.
There are things that are quite obvious non-critical in terms of performance.
One time I had a junior engineer insisting in a PR that we should use a few low-level performance tricks in a code because it was fast, and the code was to open a dialog box.
Also, in general performance bottlenecks are caused by architectural and algorithmic choices, not readability choices. If we're in a domain where, say, inheritance is an unacceptable performance bottleneck and we need to unroll loops and we can't extract functions because the cost of pushing the call stack is prohibitive... We are in an extremely performance-sensitive part of the code.
But most of the time we're far from any of that.
- gpderetta 3y agoIf inheritance and function calls are a bottleneck, it is probably the time to change programming language.