Random-error minimization during cross-correlation of early-type spectra