Run stepper motor with constant speed independent from loop

Have a look at the second example in this Simple Stepper Code

While it will often be the case that successive iterations of loop() take different lengths of time you should always ensure that iterations are as short as possible, and always that there are several (perhaps hundreds of) iterations for every step of the motor.

...R
Stepper Motor Basics