Optimized compose()