Re: Is it OK to replace optimized code with readable code?
by blucz on Monday August 13, 2012 @10:38AM
(#4376063)
The best thing is to replace the unreadable code with readable code while preserving or improving its performance characteristics.
Optimized code is often unreadable because the initial implementation didn't forsee the future optimization. A re-write that takes both into account at once is usually at least as fast and much more readable.
Optimized code is often unreadable because the initial implementation didn't forsee the future optimization. A re-write that takes both into account at once is usually at least as fast and much more readable.