The CARMENES high-precision spectrometer started operations in January 1, 2016 at the 3.5-m telescope of the Calar Alto Observatory. Since then, the CARMENES consortium is carrying out a 750-night survey searching for exoplanets around M dwarf stars, preferably in their habitable zones, using the radial velocity technique. CARMENES has the unique capability of providing continuous high-resolution spectroscopy in the visible and the near-infrared wavelength range, from 0.52 to 1.71 micron. The first 3 years of observations have demonstrated the excellent performance of CARMENES and have provided us with insight into the exploitation potential of its visible and near-infrared channels. A number of exoplanets have been published so far and observations continue for tens of bona-fide planet candidates. CARMENES is also showing its potential as a workhorse in the study of exoplanet atmospheres. In this talk I will discuss the CARMENES performance, focusing in particular on the near-infrared channel, and highlight the main results obtained during the first 3 years of operations.