Is material graph still calculated for false if() cases?

If I am using an If node in my material graph,
will the per pixel calculations still include whats coming into the plug that makes up the FALSE statement?

Ie, will my whole shader tree still get calculated for each pixel?

Is there another way to make code more optimized with branches?

Cheers

Yep, both branches are still calculated, when using IF material expression. There used to be a thread about dynamic branching in materials.

Ah ok.
So is that thread saying that if I create a Custom node with a basic if comparison then the false input graphs will not get computed?