SAA: optimize all power-of-two lengths