IR Library Using Case Switch

Would it make more sense to use the if and else if for this?

Does if statement run slower than switch case?