The talk presents a class of numerical methods, referred to as the Generalized Source Methods (GSM), for rigorous numerical solution of the elastic diffraction problem in the optical band for periodic structures. Methods possess asymptotically linear numerical complexity, and computational memory consumption, and allow for efficient parallelization on Graphical Processing Units. These properties enable the GSM to outperform other methods for complex grating diffraction simulation in diffractive and integrated optics.