A newly developed global switching algorithm that does not require calculation of nonadiabatic coupling vectors reduces computational costs significantly. However, the accuracy of this simplest nonadiabatic molecular dynamic method has not been extensively compared with the conventional Tully's fewest switches. It is necessary to demonstrate the accuracy of this global switching algorithm. An extensive comparison between local and global switching on-the-fly trajectory surface hopping molecular dynamics is performed for cis-to-trans (800 sampling trajectories) and trans-to-cis (600 sampling trajectories) azobenzene photoisomerization at the OM2/MRCI level. The global switching algorithm is coded into the Newton-X program package. Excellent agreement between the two switching algorithms is obtained not only for highly averaged quantities of quantum yields and lifetimes, but also for detailed contour patterns of product distributions, hopping spot distributions and hopping directions in terms of conical intersections between ground and the first excited states. Therefore, the global switching trajectory surface hopping method can be applied to larger complex systems in which nonadiabatic coupling is not available for excited-state molecular dynamic simulations.