News for hackers. Stuff that matters.
Re:“Clean” Code, Horrible Performance by peterashford on Tuesday February 28, 2023 @07:16PM (#34976928)
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.
Re:“Clean” Code, Horrible Performance by whstl on Tuesday February 28, 2023 @11:06PM (#34978649)
But "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.