The lattice Boltzmann equation (LBE) methods (both LBGK and MRT) and the discrete unified gas-kinetic scheme (DUGKS) are both derived from the Boltzmann equation, but with different consideration in their algorithm construction. With the same numerical discretization in the particle velocity space, the distinctive modeling of these methods in the update of gas distribution function may introduce differences in the computational results. In order to quantitatively evaluate the performance of these methods in terms of accuracy, stability, and efficiency, in this paper we test LBGK, MRT, and DUGKS in two-dimensional cavity flow and the flow over a square cylinder, respectively. The results for both cases are validated against benchmark solutions. The numerical comparison shows that, with sufficient mesh resolution, the LBE and DUGKS methods yield qualitatively similar results in both test cases. With identical mesh resolutions in both physical and particle velocity space, the LBE methods are more efficient than the DUGKS due to the additional particle collision modeling in DUGKS. But, the DUGKS is more robust and accurate than the LBE methods in most test conditions. Particularly, for the unsteady flow over a square cylinder at Reynolds number 300, with the same mesh resolution it is surprisingly observed that the DUGKS can capture the physical multi-frequency vortex shedding phenomena while the LBGK and MRT fail to get that. Furthermore, the DUGKS is a finite volume method and its computational efficiency can be much improved when a non-uniform mesh in the physical space is adopted. The comparison in this paper clearly demonstrates the progressive improvement of the lattice Boltzmann methods from LBGK, to MRT, up to the current DUGKS, along with the inclusion of more reliable physical process in their algorithm development. Besides presenting the Navier-Stokes solution, the DUGKS can capture the rarefied flow phenomena as well with the increasing of Knudsen number.