FxPro Group Interview Question

How can you optimise this solution?