top | item 20388460

(no title)

Splines | 6 years ago

Re: performant code, the developer writes the code once, it is read many times, and it is run many many many times. Several orders of magnitude more.

Yes, making code that is easy to read and less bug-prone is good. But at the end of the day the customers are going to be running your code millions of times a day, and if you need to make the code slightly harder to read to improve performance, then by all means do so.

If your code is only going to be run once and must be reliable, then you can make a different trade-off.

discuss

order

theshrike79|6 years ago

Just make sure you actually _need_ to make the code more performant, because we all know what premature optimization is the root of.

exo762|6 years ago

What is premature and what is not? Is choosing fit for a job data structures a premature optimization? I don't think so. But I've seen people arguing against it.