Optimized code.