increase performance of spectrum-related functions