Concerning speedtests

Dar Scott dsc at
Fri Dec 5 12:43:28 EST 2003

On Friday, December 5, 2003, at 07:25 AM, Wouter wrote:

> The speedtests that sometimes are proposed are "very" relative.
> Certainly in a preemptive multitasking environment with lots of
> processes running.

One approach is to take several measurements and to use the minimum for 
comparison.  On OS X, the time resolution is a microsecond and you can 
measure the time to execute a single operation and in that case any 
effect of interrupt time or task switching time is clearer.

On OS X, I find the following handy in timing for selecting alternate 

Wait a half second at the top of the mouseup handler.
Use long seconds
Throw away the first 'long seconds'.
Don't put extra computation in the commands that get the 'long seconds'.
Create a calibration value for a nil measurement and use that.
If the command is very fast, duplicate it ten times and adjust time.
Use both loop and non-loop methods.
Log minimum times in comparing methods.
Don't check mail or play games at the same time.

Dar Scott

More information about the Use-livecode mailing list