Can't reach max speed when accelerating using AccelStepper

To expand on what @wildbill said, here is Robin2's simple stepper program that will show how to control a stepper without a library.

There is also a non-blocking version.

You may also want to investigate the MobaTools stepper library. You may be able to get more speed with that library than Accelstepper.