Hacker News new | ask | show | jobs
by damienmeur 120 days ago
It really depends on what you are building, coding is always about trade-offs, and sometimes (not always) you have to choose between maintainability/readability and performance.

If you are writing code for embedded devices where every cpu cycle counts, I would indeed trade a bit of the maintenance for some cpu cycle.

If I am writing a huge web app that has to be maintained years by a large team of devs, I would prefer a more simple/maintanable code over a fast one (+ in such scenarios the real bottlenecks are often your I/O, not the raw CPU perf).

This is for the same reason you usually write code that needs to be fast in low-level programming lng like C and huge web app in Node.js or Java.