Optimized reduce