Sign in to follow this  
Followers 0
jvanegmond

Speed

9 posts in this topic

I was wondering, which of the two languages would be faster. I am yet to start discovering AutoItX, but if it is faster, I definately would not mind writing all my AutoIt scripts in C++ in the future, using the AutoItX dll.

I was also surprised that I could not find a topic where this has been asked before.

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

My guess would be AutoItX as it there is no script to be parsed. Just a guess though as i personaly have never used AutoitX. (yet anyway) ;)

Edit:Oops what I am doing in AutoItX Support. :">

Edited by SolidSnake

HKTunes:Softpedia | GoogleCodeLyricToy:Softpedia | GoogleCodeRCTunes:Softpedia | GoogleCodeMichtaToolsProgrammer n. - An ingenious device that turns caffeine into code.

Share this post


Link to post
Share on other sites

It doesn't have all the functions of AutoIt in the dll if I am not mistaken. You will have to find some APIs yourself.

Share this post


Link to post
Share on other sites

For example, HotKeySet()


# MY LOVE FOR YOU... IS LIKE A TRUCK- #

Share this post


Link to post
Share on other sites

Quite. I actually asked the forum what the native call was for HotKeys.

Share this post


Link to post
Share on other sites

I was wondering, which of the two languages would be faster. I am yet to start discovering AutoItX, but if it is faster, I definately would not mind writing all my AutoIt scripts in C++ in the future, using the AutoItX dll.

I was also surprised that I could not find a topic where this has been asked before.

I am not sure, but i would bet you that AutoItX functions and regular autoit scripts with the same functions execute at the same speed. This is because they are the same functions and are being executed by the autoit script engine in the same way in both cases. While loops and stuff like that would be executed faster if performed in c++ though.


"So man has sown the wind and reaped the world. Perhaps in the next few hours there will no remembrance of the past and no hope for the future that might have been." & _"All the works of man will be consumed in the great fire after which he was created." & _"And if there is a future for man, insensitive as he is, proud and defiant in his pursuit of power, let him resolve to live it lovingly, for he knows well how to do so." & _"Then he may say once more, 'Truly the light is sweet, and what a pleasant thing it is for the eyes to see the sun.'" - The Day the Earth Caught Fire

Share this post


Link to post
Share on other sites

I am not sure, but i would bet you that AutoItX functions and regular autoit scripts with the same functions execute at the same speed. This is because they are the same functions and are being executed by the autoit script engine in the same way in both cases. While loops and stuff like that would be executed faster if performed in c++ though.

Priceless. AFAIK, Using C++ with AutoItX (which is also coded in C++) evalutes by you to using the same script emgine as AutoIt3? ;)

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

Priceless. AFAIK, Using C++ with AutoItX (which is also coded in C++) evalutes by you to using the same script emgine as AutoIt3? ;)

What i mean MHz is that the functions are the same. The WinActive() function is the same in the dll as in the compiled exe. Both are done by the exact same c++ function so the speed should remain the same. As for lower level things like looping, opening files, declaring variables, manipulating strings, manipulating datatypes, etc. c++ will be faster.

In order for your script to be faster, you would have to write the main program in c++ and then for specific automation tasks you would use the dll functions, which would be fine, and the program would be much faster than a compiled autoit script. As far as calling the individual functions in the dll and in the script, they should probably take around the same amount of time, they are both compiled using the same function source code written in c++. I shouldn't have said engine, i should have said function library.

Edited by The Kandie Man

"So man has sown the wind and reaped the world. Perhaps in the next few hours there will no remembrance of the past and no hope for the future that might have been." & _"All the works of man will be consumed in the great fire after which he was created." & _"And if there is a future for man, insensitive as he is, proud and defiant in his pursuit of power, let him resolve to live it lovingly, for he knows well how to do so." & _"Then he may say once more, 'Truly the light is sweet, and what a pleasant thing it is for the eyes to see the sun.'" - The Day the Earth Caught Fire

Share this post


Link to post
Share on other sites

You have to remember that AutoIt scripts are interpreted. It takes some time to read a line, parse it, then call a function from a large array. Compiled C++ is a set of constant instructions. AutoIt has a lot of background work per line.

Share this post


Link to post
Share on other sites

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
Sign in to follow this  
Followers 0