Tranglo Interview Question

How do you optimise the code when its performance is slow?