Efficient numerical methods for rigorous simulation of the light diffraction on periodic structures