I don't see why there is a performance difference with transparent voxels though. The scene is rendered twice, any fragment passes either trough the first if in the first run and the second if in the second run or vice versa. This means any fragment passes the part below the ifs once per frame.
 I can't explain it via Z-Buffer either because the z test is applied after the fragment shader has run. Can blending be the problem? With many transparent fragments on one pixel, the GPU has to blend a lot