Optimize performance-sensitive code by eliminating unnecessary work: