If and else, were should I put the more likely part?

Prefer to put them in the order that makes the code clearer, which is usually having the more likely to be executed first.


As others said: in terms of performance you should best rely on your compiler and your hardware (branch prediction, speculative execution) to do the right thing.

In case you are really concerned that these two don't help you enough, GCC provides a builtin (__builtin_expect) with which you can explicitly indicate the expected outcome of a branch.

In terms of code readability, I personally like the more likely case to be on top.