4 ms·
Since there's no clear definition of _better_ you can't. The point of the scientific method is to test a theory against natural laws. Assume you write a functi
by atmosx 5y ago
Since there's no clear definition of _better_ you can't. The point of the scientific method is to test a theory against natural laws.
Assume you write a function using all the tricks in the book. It's fast(er) than the proposed solution on the PR review, but unreadable. If merged, future team members might have a hard time understanding what's happening. If not merged, the code will be slower (milliseconds x thousands of requests).
Which way to go? :-)
- djmips 5y agoOptimizing is perhaps one of the best applications of scientific reasoning in programming since the 'natural law' in this case is how the hardware actually works as opposed to whatever wrong abstraction you start with. Sometimes it is more important to be fast so in that case you know which way to go.