Why 'if' node doesnt affect the performance?

Material nodes aren’t like the blueprint nodes. I’m not 100% certain but it still does all the calculations even thou it doesn’t use the end result.
so both of the calculations are done and probably check afterwards which one to use.