2 ms·
> More readable code almost always means less efficient code. Incorrect. Most practices like meaningful variable names, logically separated functions and class
by olavk 9y ago
> More readable code almost always means less efficient code.
Incorrect. Most practices like meaningful variable names, logically separated functions and classes, comments where appropriate, etc have absolutely no impact on performance. Principles like DRY and KISS and YAGNI typically also lead to better performance. Only in rare isolated cases might there be a conflict, eg. where a more cryptic algorithm have better performance than the straightforward.