Bloomberg interview question

How would you optimize this line of code?