gl-spectrum: speed improvements