We provide a systematic comparison of two numerical methods to solve the widely used nonlinear Schrodinger equation. The first one is the standard second order split-step (SS2) method based on operator splitting approach. The second one is the Hamiltonian integration method (HIM). It allows the exact conservation of the Hamiltonian at the cost of requiring the implicit time stepping. We found that numerical error for HIM method is systematically smaller than the SS2 solution for the same time step. At the same time, one can take orders of magnitude larger time steps in HIM compared with SS2 still ensuring numerical stability. In contrast, SS2 time step is limited by the numerical stability threshold.