2 ms·
I agree with the condition about "If you're at BigCo". It really depends on who's going to read/edit the code, how often, and how many times it's going to be ex
by blowski 10y ago
I agree with the condition about "If you're at BigCo". It really depends on who's going to read/edit the code, how often, and how many times it's going to be executed.
For a line of code that's going to be executed on a global scale billions of times every second, and only changed (very rarely) by extremely good developers, then I'd happily trade a bit of clarity for a bit more performance.
But if it were an oft-edited method in an in-house application that's going to be supported by junior devs? I would prefer clarity.
As always, there are no universal rules, only tradeoffs.