It is all about context. If the particular thing your doing is handling a debug code path over a release then using preprocessors like #ifdef will certainly be better for you. They will make your shaders smaller as the shader code in there will be compiled out. If you use branching you can certainly make things fast but again if your not going to be using whatever is inside the block, using #ifdef will still make it smaller.
Cheers
Kyle