Jump to content

Do compiled scripts run any faster?


Recommended Posts

Normally, compiled versions of code run much faster than interpret code. But the compiled version of AutoIt code may well be the AutoIt3.exe combined with a version of the original script which is then interpreted in real time.

My tests indicate that the execution speed is very similar whether you are running a raw script or its compiled equivalent. This leads me to believe that compiled code is interpreted on the fly.

Can anyone confirm that raw and compiled code have a similar execution speed?

Link to post
Share on other sites

One day I hope it won't be interpreted, don't know how that will be done though, the speed increase would be orgasmic :lmao:

"I thoroughly disapprove of duels. If a man should challenge me, I would take him kindly and forgivingly by the hand and lead him to a quiet place and kill him." - Mark TwainPatient: "It hurts when I do $var_"Doctor: "Don't do $var_" - Lar.
Link to post
Share on other sites

I don't believe it is possible.

It is a script language. The language/scripts needs an interpreter/engine/parser.

Just like you can't compile batch files, VBScripts, etc to machine code AutoIt scripts can't too.

This is just me thinking. Correct me if I'm wrong.

Link to post
Share on other sites

Yeah. Was just saying, it'd be sweet if a language as simple as AutoIT was way faster :lmao:

"I thoroughly disapprove of duels. If a man should challenge me, I would take him kindly and forgivingly by the hand and lead him to a quiet place and kill him." - Mark TwainPatient: "It hurts when I do $var_"Doctor: "Don't do $var_" - Lar.
Link to post
Share on other sites

I can when I'm doing something like finding all the pixels. Takes 700~ MS to do something I *believe* it'd take C++ to do in about 200~ maybe.

It's pretty much ONLY for game automating, that it has to be faster :lmao:

EDIT:

My '1337' programming buddy just informed me something like that could be done in 10 MS or less... about 100x speed improvement o:)

Edited by Insolence
"I thoroughly disapprove of duels. If a man should challenge me, I would take him kindly and forgivingly by the hand and lead him to a quiet place and kill him." - Mark TwainPatient: "It hurts when I do $var_"Doctor: "Don't do $var_" - Lar.
Link to post
Share on other sites

No... my computer is about as fast as it gets.

And it was off the top of his head, most likely *slightly* overthrown :lmao:

"I thoroughly disapprove of duels. If a man should challenge me, I would take him kindly and forgivingly by the hand and lead him to a quiet place and kill him." - Mark TwainPatient: "It hurts when I do $var_"Doctor: "Don't do $var_" - Lar.
Link to post
Share on other sites

Yes. I need it for MORE then pixelsearch though, I need one that also returns every pixel found. I have to scan each pixel, though :lmao:

"I thoroughly disapprove of duels. If a man should challenge me, I would take him kindly and forgivingly by the hand and lead him to a quiet place and kill him." - Mark TwainPatient: "It hurts when I do $var_"Doctor: "Don't do $var_" - Lar.
Link to post
Share on other sites

autoit doesnt go very fast, but i like autoit to much to use other languages very much.

does anyone know if the autoit3.dll is any faster?

[font="Times"] If anyone remembers me, I am back. Maybe to stay, maybe not.----------------------------------------------------------------------------------------------------------[/font][font="Times"]Things I am proud of: Pong! in AutoIt | SearchbarMy website: F.R.I.E.S.A little website that is trying to get started: http://thepiratelounge.net/ (not mine)[/font][font="Times"] ----------------------------------------------------------------------------------------------------------[/font][font="Arial"]The newbies need to stop stealing avatars!!! It is confusing!![/font]

Link to post
Share on other sites

I don't believe it is possible.

It is a script language. The language/scripts needs an interpreter/engine/parser.

Just like you can't compile batch files, VBScripts, etc to machine code AutoIt scripts can't too.

This is just me thinking. Correct me if I'm wrong.

<{POST_SNAPBACK}>

You stand corrected (despite what others are trying to tell you).

A compiler parses script statements on the fly, and executes their functionality. A compiler, on the other hand, parses those script statements once and generates their functionality into a language of choice. In this case, AutoIT would have its resultant functionality written, say, in C++. The C++ is then compiled with a regular C++ compiler of choice (built into or accompanying the AutoIT compiler) and the result produced is an executable machine code -> file.exe

The speed comes from the fact that the AutoIT, say, instructions are hard written into C++ -> machine code. There is no interpretation required at runtime. Often their can be many optimizations achieved by understanding what the original code was trying to achieve, and using some intelligence to simply that.

Even simple things which most good compilers do are:

1. Don't bother allocating space for declared variables if they're never actually used

2. Throw away all comments

3. Throw away any code which, by the way the logic is written, would never be executed

...and the list goes on and on.

Any interpreted language can be compiled into any intermediate language, and hence into machine code, if you so choose to do it. Even DOS batch files could have their functionality represented in C and then compiled down, although the speed saving wouldn't make the process worth it.

In regard specifically to AutoIT, you would want to know the following things:

. Any new functionality added to the AutoIT interpreter would also have to be added to the AutoIT compiler. The code may be similar, but quiet different. Are you OK with that?

. Any new functionality would need to be optimized into the compiler. Are you OK with that?

. Are AutoIT that large/slow that they need compiling?

The answer may be yes or no, depending on your use of AutoIT.

Link to post
Share on other sites

I've been thinking of starting this for some time, I think in a couple of versions, and once that source is released for that version is should be fairly easy. I'm sure this may have been on the dev's mind at one point or another, but hardly justifies the work at this point and easy to abuse if one gets lazy by mixing code for things autoit does not support taking away from it's development perhaps. Would solve alot of decompile issuses as well as starting to put autoit towards that, "programming language someday" poll started so long ago. Perhaps by then more contributors will have the skill to really help tackle this project, and the ones that already have the skill will have the time. Once Com/activex and problems at hand, and even bigger things are accomplished it may be a grand idea. If things could stay the way they are as in Free, I think this could be amongst the top 100 most significant releases to date for the open source community for windows.

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
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...