Why does this code go so slowly?

Blitz3D Forums/Blitz3D Programming/Why does this code go so slowly?

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Actually, it loops 501 times. it loops with i = RN_DelayLoop for the first loop, then i = RN_DelayLoop+1 for the second loop, i = RN_DelayLoop+2 for the third, etc... all the way to i = RN_DelayLoop+500 for the 501st loop.
Although I cannot see that as being the cause of the slowdown, unless you're accidentally writing to an extra byte that's out of range which I would think would be caught by the debugger.
If you want it to iterate exactly 500 times, the command should read For i = RN_DelayLoop to RN_DelayLoop + 499.