Optimized horizontal_or