You might be able to loop all of the code multiple times in the main loop to speed it up. This is usually how I speed up physics simulations without screwing up the actual physics.