Hacker News new | ask | show | jobs
by HelloNurse 3154 days ago
Probably taste: normal case first, special case last, regardless of what the respective comparison clauses look like.
1 comments

Also efficiency, you want the most often true thing first. Although it is more important in nested if's. Had a colleague write a If else nested 104 levels deep (pre COBOL II so no case structure available). We halved the run time of the program simply by making the four most common conditions the first four.