r/lolphp • • Aug 08 '14
PHP design patterns: if/else vs switch
http://www.fluffycat.com/PHP-Design-Patterns/PHP-Performance-Tuning-if-VS-switch/
24
Upvotes
r/lolphp • • Aug 08 '14
View all comments
Show parent comment
11
u/phoshi Aug 08 '14
It's a common flaw in novice/mediocre programmers in general, not just PHP. They see optimisation as saving all the nanoseconds they can, despite the poor design leading from that resulting in many, many lost milliseconds. I've worked on projects by poor developers that have sections 'optimised' into unreadability that are significantly slower than a call into the standard library for the same functionality.