Google Interview Question

Given a piece of code. How to improve it for a better performance.