optimized power_spectrum