Optimization of search algorithms for a mass spectra library