3 ms·
Casey Muratori is wrong about clean code (but he's also right)
- cratermoon 4y ago"Always profile your code to know what is fast and what isn't!" I'm sure Muratori is aware of this and demonstrating how – if a particular section of clean code measures as a performance bottleneck, and the clean organization is itself the cause – to go about rewriting for performance. However, Muratori didn't do that in his original post. He took on "clean code" defined in his specific way and used that to grind his axe. I'm not saying he purposely wrote the clean version in a slow way, but it was written in a naive way. It would have been more honest to simply note a personal dislike for clean code and say how he would do it. Also, Teran's (codef00) point about moving much of the work to compile-time is just the sort of thing someone steeped in writing optimal code would do without a second thought, and forgetting the huge performance implications.