Jump to content

Recommended Posts

Posted

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
Posted

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.

Posted

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?

Posted

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
Posted

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.

Posted

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? ;)
Posted

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.

Posted (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 by Michel Claveau
Posted

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.

Posted (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 by tresa

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...