I think there is no obvious way of telling this, because it depends on how you if statement will be constructed and in the end what machine code will be generated from your code.
So best thing would probably be implement both and measure the results. I would argue that's how performance optimisations work. Don't trust on what a forum post tells you.
However chances are high that both will have similar performance in a range that doesn't matter for your use case... Without knowing your use case :)
Oder einfach einen Fick darauf geben was die Umfragen sagen und stattdessen einfach wählen was man für richtig hält 🙂