Can't work out why there is a difference in time for this code. If I use seperate images in the loop I get the same 'odd' results.
On my system numloops set to 20000 produces same results for both the X and Y loops (27ms).
When I increase to 25000 the X loop returns 34ms while the Y loop returns 180ms and even as much as 1287ms.
I thought it was GC kicking in but manual mode shows similar results.
Graphics 640,480 Const numloops=25000 Local image1:TImage=LoadImage("max.png") t1:Int=MilliSecs() For Local x:Int = 1 To numloops DrawImage image1,0,0 Next t2:Int=MilliSecs() For Local y:Int = 1 To numloops DrawImage image1,0,0 Next t3:Int=MilliSecs() Print (t2-t1) + " " + (t3-t2)
On my system numloops set to 20000 produces same results for both the X and Y loops (27ms).
When I increase to 25000 the X loop returns 34ms while the Y loop returns 180ms and even as much as 1287ms.
I thought it was GC kicking in but manual mode shows similar results.