Several variance reduction techniques, such as photon splitting, electron history repetition, Russian roulette and the use of quasi-random numbers are investigated and shown to significantly improve the efficiency of the recently developed XVMC Monte Carlo code for photon beams in radiation therapy. It is demonstrated that it is possible to further improve the efficiency by optimizing transpon parameters such as electron energy cut-off, maximum electron energy step size, photon energy cut-off and a cut-off for kerma approximation, without loss of calculation accuracy. These methods increase the efficiency by a factor of up to 10 compared with the initial XVMC ray-tracing technique or a factor of 50 to 80 compared with EGS4/PRESTA. Therefore, a common treatment plan (6 MV photons, 10 x 10 cm2 field size, 5 mm voxel resolution, 1% statistical uncertainty) can be calculated within 7 min using a single CPU 500 MHz personal computer. If the requirement on the statistical uncertainty is relaxed to 2%, the calculation time will be less than 2 min. In addition, a technique is presented which allows for the quantitative comparison of Monte Carlo calculated dose distributions and the separation of systematic and statistical errors. Employing this technique it is shown that XVMC calculations agree with EGSnrc on a sub-per cent level for simulations in the energy and material range of interest for radiation therapy.