3 ms·
we should all focus on writing simple and easy to understand code That is an optimisation. I've found that the simplest solution is usually the most efficient.
by userbinator 9y ago
we should all focus on writing simple and easy to understand code
That is an optimisation. I've found that the simplest solution is usually the most efficient.
- virgilp 9y agoThis is a good-sounding statement, so it "feels true". But, if you stop to really think about it... It's probably false in most circumstances [1] [1] If by "efficient" you mean time-efficient. If you pick your own efficiency metric, then yes, sure, I guess so...
- mnm1 9y ago"I've found that the simplest solution is usually the most efficient." If this was true, we'd all be using bubble sort and searching databases without indexes, row by row. I can think of very few algorithms or even situations where this is true.