Does Cycles calculate 0 factor shaders?
No, cycles doesn't have to spend time rendering those nodes:


  Unnecessary shader inputs inside the Mix Shader are now ignored, in case the factor is 0.0 / 1.0 and not connected.


Also if a node branch is not connected to output, that branch is skipped. So for example when you have a node group outputting multiple shaders, it calculates only the connected ones:



Or:



This way you don't have to use Mix node "0/1 switches" and you can keep your node group count low and organised.