Optimized chain loop