As it now appears, my tests were flawed.
Here's the code:
#pragma disableBackgroundTasks
#pragma disableautoWaitCursor
#pragma disableBoundsChecking
#pragma nilObjectChecking false
dim time, time2 as Double
dim i, j as Integer
time=microseconds
For j=0 to 100000000
i=i+1
Next
time=microseconds-time
i=0
time2=microseconds
For j=0 to 100000000
i=i--1
Next
time2 =microseconds-time2
msgbox str( time )+chrb(10)+str( time2 )
As it turns out, the second loop is always faster than the first. I cannot
explain it, but when I switched the two loops the earlier results were
reversed. Perhaps the instructions are cached by the CPU?
Ronald Vogelaar
http://www.rovosoft.com
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>