Instead of creating new obstacles every time, we can create a pool of obstacles. Reusing older objects will increase the efficiency.