23 ms·
This isn't true in my experience. Even in the context of games development. It pays to be simple at the outset because you often need to iterate code to get it
by peterashford 4y ago
This isn't true in my experience. Even in the context of games development. It pays to be simple at the outset because you often need to iterate code to get it right and writing and iterating optimised code is harder and slower than just doing something simple first. And YES, we ALWAYS went back and optimised the slow bits.
- whstl 4y agoBut "being simple from the outset" is exactly what Casey is advocating here. Start with the simple code, that he ends up with, rather than optimizing for a "Cleanliness" metric. His final code is definitely simpler than the alternative, which would probably involve several files in another environment. Sure, he does reach for a benchmark, but that's merely to demonstrate the end result.