Writing efficient code isn't premature optimization. "Optimization", in the turn of phrase's context specifically, is supposed to mean corner-cutting and hacky workarounds to save a step or two.
Writing good code in the first place REMOVES the need for optimization.
Writing good code in the first place REMOVES the need for optimization.
No, those are different. Look up the famous Quake 3 root optimisation, technically it's immensely faster, but not considered good code, because it's full of "magic numbers" and incredibly hard to understand while the code nor the comments don't provide any info on what's it's doing at all. It generally take a 15mn video to understand those 3 last lines.
Writing efficient code isn't premature optimization. "Optimization", in the turn of phrase's context specifically, is supposed to mean corner-cutting and hacky workarounds to save a step or two.
Writing good code in the first place REMOVES the need for optimization.
No, those are different. Look up the famous Quake 3 root optimisation, technically it's immensely faster, but not considered good code, because it's full of "magic numbers" and incredibly hard to understand while the code nor the comments don't provide any info on what's it's doing at all. It generally take a 15mn video to understand those 3 last lines.
I watched a video about that a couple of years ago. Great stuff, highly recommended.