Design and performance of a highly efficient mass spectrometer for molecular beams