Michel Claveau Posted November 20, 2006 Posted November 20, 2006 Hi! With the code under-mentioned, the compiled version is 80% more slowly than the .au3 version. Is it normal? #NoTrayIcon AutoItSetOption("WinTitleMatchMode", 3) $begin = TimerInit() For $i=1 to 1000 $handle=ControlGetHandle("called", "",3) If @error Then MsgBox(4096, "Error", "Ne trouve pas le contrôle") Else ControlSetText("called","",$handle,String($i) & "Azertyuio Azertyuio Azertyuio Azertyuio Azertyuio Azertyuio Azertyuio " & String($i),0) EndIf Next $dif=TimerDiff($begin) MsgBox(0,"Temps",$dif)
Moderators SmOke_N Posted November 20, 2006 Moderators Posted November 20, 2006 The script you provided... what are we supposed to test that on? I did my own test 100 of them, and they were within one percent of each other overall. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.
Michel Claveau Posted November 20, 2006 Author Posted November 20, 2006 Hi! I save the script like essai.au3 ; run give 7 seconds I compile to essai.exe ; run give 13 seconds I test ten times the test, with little differences, but the same ratio I conclude than compiled version are more slowly. Perhaps, am I wrong?
Rad Posted November 20, 2006 Posted November 20, 2006 It would be easier to understand and solve the problem if you explain what you need to do, maybe a different method altogether could solve the problem? Maybe the speeds depends on your physical hardware, so that an old machine and a new gaming PC will have big changes, but we dont know that either
Moderators SmOke_N Posted November 20, 2006 Moderators Posted November 20, 2006 It stands to reason that the compiled version (this being an interpreted language) is going to be slower, but that's quite a significance there. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.
MHz Posted November 21, 2006 Posted November 21, 2006 It stands to reason that the compiled version (this being an interpreted language) is going to be slower...Please explain why should there be a speed difference between compiled and uncompiled?
herewasplato Posted November 21, 2006 Posted November 21, 2006 Things could have changed since this post:http://www.autoitscript.com/forum/index.ph...post&p=3061Disconnect from the NET, scan drive with Antivirus (AV) tool, turn off or uninstall any AV tools - especially any with a heuristic feature... then repeat your tests. [size="1"][font="Arial"].[u].[/u][/font][/size]
Valik Posted November 21, 2006 Posted November 21, 2006 If I had to guess, I would say you are running using a current beta and compiling using 3.2.0.1. The beta caches things which can speed up scripts tremendously.
Michel Claveau Posted November 21, 2006 Author Posted November 21, 2006 (edited) Hi, Valik!You are right: AutoIt "not-beta" are faster than the light beta-releases (for compiled & not-compiled scripts).I repeat my tests, with not-beta version: no significant diff between compiled/not-compiled, and 40% faster than beta...If I had to guess, I would say you are running using a current beta and compiling using 3.2.0.1. The beta caches things which can speed up scripts tremendously. Edited November 21, 2006 by Michel Claveau
Valik Posted November 21, 2006 Posted November 21, 2006 I'm sorry, but that's not possible. The beta versions are faster. The beta uses a new caching system which speeds up virtually all scripts and some scripts will notice significant speed improvements. There's simply no way that 3.2.0.1 is 40% faster than 3.2.1.13.
tresa Posted November 22, 2006 Posted November 22, 2006 (edited) Hi! With the code under-mentioned, the compiled version is 80% more slowly than the .au3 version. Is it normal? #NoTrayIcon AutoItSetOption("WinTitleMatchMode", 3) $begin = TimerInit() For $i=1 to 1000 $handle=ControlGetHandle("called", "",3) If @error Then MsgBox(4096, "Error", "Ne trouve pas le contrôle") Else ControlSetText("called","",$handle,String($i) & "Azertyuio Azertyuio Azertyuio Azertyuio Azertyuio Azertyuio Azertyuio " & String($i),0) EndIf Next $dif=TimerDiff($begin) MsgBox(0,"Temps",$dif) If speed is the issue is it possible to change your code to #NoTrayIcon AutoItSetOption("WinTitleMatchMode", 3) $handle=ControlGetHandle("called", "",3) If @error Then MsgBox(4096, "Error", "Ne trouve pas le contrôle") Exit Endif $text="Azertyuio Azertyuio Azertyuio Azertyuio Azertyuio Azertyuio Azertyuio " $begin = TimerInit() For $i=1 to 1000 $result=ControlSetText("called","",$handle,String($i) & $text & String($i),0) If $result=0 Then MsgBox(4096, "Error", "Ne trouve pas le contrôle") ExitLoop EndIf Next $dif=TimerDiff($begin) MsgBox(0,"Temps",$dif) Edited November 22, 2006 by tresa
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now