Lateral shearing interferometry is widely applied in wavefront sensing, optical components testing, and defect inspection. The procedure of reconstructing the wavefront is the most specific difference between lateral shearing interferometry and other classical methods such as the Fizeau and Twyman interferometers. The speed and accuracy are two main features to evaluate the performance of one wavefront reconstruction method. In this work, optimized procedures for three typical wavefront reconstruction methods-the iterative FFT wavefront reconstruction method (FFT method), the partial differential least-squares method (LSQ method), and the difference Zernike polynomial fitting method (DZF method)-are designed. The calculation speeds of the three wavefront reconstruction methods are evaluated with different GPUs and CPUs. According to the test results, the DZF method is the fastest method both in the GPUs and CPUs. The shortest processing times of the DZF, FFT, and LSQ methods are 100, 449, and 494 ms, respectively, with the wavefront size of 1024×1024pixels. The calculation speeds of the FFT method and the LSQ method are similar in the CPUs, and the FFT method is faster in the GPUs. The relationship between the consumed time and the wavefront size is an exponential function in the CPUs and a power function in the GPUs. Generally speaking, GPUs' processing speeds are faster than CPUs'. But CPUs can be faster than GPUs when the test wavefront sizes are smaller than 64×64pixels. Besides, the differences between the consumed times of different CPUs are relatively smaller than those of the GPUs.