Hacker Timesnew | past | comments | ask | show | jobs | submitlogin

I'm not sure a 'readable' preemptive micro optimization is any more sensible. I think we should limit 'sensible' to preemptive macro and architectural optimization. A programmer should examine what their compiler is spitting out before they decide they can do better.


What is a "micro-optimization" is debatable, but if you have two ways of doing the same thing, and you can do the fastest one without impact safety or readability, it's not wrong to pick the fastest one (for instance, no point in building list A in order to append A to list B when you can directly add stuff in list B, like the code I refactored away one hour ago).

As for architectural optimization, I disagree. There are things you're really going to have a hard time adding post facto. If you know you're going to need performance, it's important to know what kind of program you're going to build (this may include benchmarking prototypes).




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: