It also looks like a mess to me. Timing: 1 thousand sorted in 0.031 seconds on this. The speed depends on your computer. 1 thousand sorted in 40.832 secs in the original.
Thank you @SuperSonicMario I added in a Temporary Turbo Mode.