here we have a hi res benchmark script build with my benchmarking framework ...
(abs framework from
http://www.autohotkey.com/forum/viewtopic.php?t=35354)
ABS 1.0 wrote:
---------------------------
Benchmark Results 5 Runs with 10 Rounds
---------------------------
SetBatchLines, 20
Critical, Off / Process Priority Normal
0.100033 sec (Standard SetTimer,Label,-10)
SetBatchLines, -1
Critical, Off / Process Priority Normal
0.175800 sec (Standard SetTimer,Label,-10)
SetBatchLines, -1
Critical,Off / Process Priority High
0.183413 sec (Standard SetTimer,Label,-10)
---------------------------
OK
---------------------------
this is the abs code used (code to benchmark is red):
Code:
; QueryPerfomanceCounter - Benchmark Skript
; Part of Official PlayAHK.com xFast-Exec Benchmark Skript
; Version 1.0 (w) 2008 by DerRaphael / zLib License Style Release
DllCall("QueryPerformanceFrequency", "Int64*", BenchMark[F])
; BENCHMARK START
; Äußere Runden / Outer Rounds
@OR := 5
; Innere Läufe / Inner Runs
@IR := 10
; Start Benchmark
Loop,3
{
Setting := A_Index
SetBatchLines, 20
Critical, Off
Process, Priority,, Normal
if (A_Index = 1) {
CurrentSettings := "SetBatchLines, 20`nCritical, Off / Process Priority Normal"
} else if (A_Index = 2) {
CurrentSettings := "SetBatchLines, -1`nCritical, Off / Process Priority Normal"
SetBatchLines, -1
Process, Priority,, Normal
} else if (A_Index = 3) {
CurrentSettings := "SetBatchLines, -1`nCritical,Off / Process Priority High"
SetBatchLines, -1
Process, Priority,, H
}
OfficialResult .= "`n" CurrentSettings "`n"
tooltip,% currentsettings, 10, 10
Loop, % @OR
{
A_Run := A_Index
Loop, % @IR
{
; Zähler der auszuführenden Tests / Count of Tests to accomplish
A_Test := 0
; SOBM***********************************************************************************
A_Test+=1
if !StrLen(Desc[%A_Test%])
Desc[%A_Test%] := "Standard SetTimer,Label,-10"
DllCall("QueryPerformanceCounter", "Int64 *", BenchMark[SC]) ; StartCounter
; Hier komme hinein, was getestet wird / Insert what needs to be tested
counter := 0
Loop,
if (counter=10) ; expected ideal time is 100 ms
break
Else {
SetTimer,tst_iteration,-10
}
; Hier ist zuende, was getestet wurde / End of whatever has been tested
DllCall("QueryPerformanceCounter", "Int64 *", BenchMark[EC]) ; EndCounter
Result[%A_Test%][%A_Run%][%A_Index%] := (BenchMark[EC] - BenchMark[SC]) / BenchMark[F]
; ***********************************************************************************EOBM
}
; Zeiten mitteln / Average Timings
Loop, % A_Test
{
A_Test := A_Index
Result[%A_Test%][%A_Run%] := 0
Loop, % @IR
Result[%A_Test%][%A_Run%] += Result[%A_Test%][%A_Run%][%A_Index%]
Result[%A_Test%][%A_Run%] /= @IR
}
}
; BENCHMARK END
; Resultate ermitteln / Calculate Results
Loop, % A_Test
{
A_Test := A_Index
Result[%A_Test%] := 0
Loop, % A_Run
Result[%A_Test%] += Result[%A_Test%][%A_Index%]
Result[%A_Test%] /= @OR
OfficialResult .= Result[%A_Test%] " sec`t(" Desc[%A_Test%] ")`n"
}
}
SetBatchLines, 20
Critical, Off
Process, Priority,, Normal
MsgBox,64,Benchmark Results %@OR% Runs with %@IR% Rounds, %OfficialResult%
ExitApp
tst_iteration:
counter += 1
return
i might be wrong, but to me it looks as if the timer works perfectly well under standard circumstances. maybe someone else can also benchmark this one and post result msgbox (1ghz / win2k sp4 / ahk 1.0.48 beta)
try rerunning the script multiple times as windows caches the binary (later runs result in more acurate timings)
greets
dR