Quantum pumping, in its different forms, is attracting attention from different fields, from fundamental quantum mechanics, to nanotechnology, to superconductivity. We investigate the crossover of quantum pumping from the adiabatic to the anti-adiabatic regime in the presence of dissipation, and find general and explicit analytical expressions for the pumped current in a minimal model describing a system with the topology of a ring forced by a periodic modulation of frequency omega. The solution allows following in a transparent way the evolution of pumped DC current from much smaller to much larger omega values than the other relevant energy scale, the energy splitting introduced by the modulation. We find and characterize a temperature-dependent optimal value of the frequency for which the pumped current is maximal.