Code optimized for better performance.