Jump to content

Autoit is slow


gear
 Share

Recommended Posts

I find Autoi is slow , please try the following short routine:

$begin = TimerInit()

$i=1

While $i<100000000

$i=$i+1

WEnd

$dif = TimerDiff($begin)

MsgBox(1,"",$dif)

Well, name a logical situation where you are going to have to run a loop 100 million times with no sleep.

Link to comment
Share on other sites

I find Autoi is slow , please try the following short routine:

$begin = TimerInit()

$i=1

While $i<100000000

$i=$i+1

WEnd

$dif = TimerDiff($begin)

MsgBox(1,"",$dif)

yep, you are right. AutoIT is too slow for you. You're better off with C++ or C# or even better Assembly.

__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

Link to comment
Share on other sites

please try Rebol (www.rebol.com), rebol is very fast, it takes my PC 70s to run the same program with rebol, but

about 3000s with Autoit3.0. rebol is aslo powerful.. you can try it.

the code should be in rebol:

print now

ss: func [z] [x: 1 loop 100000000 [x: x + 1] ]

do ss 1

print now

you just need to copy the above code to rebol's console.

Rebol is also powerful in many aspects, but I think its grammar is strange, it may be hard to use. but I still believe Autoit has a lot to learn from rebol.

Gear

Link to comment
Share on other sites

please try Rebol (www.rebol.com), rebol is very fast, it takes my PC 70s to run the same program with rebol, but

about 3000s with Autoit3.0. rebol is aslo powerful.. you can try it.

the code should be in rebol:

rebol? Never heard, and to be honest I don't care, as this is the AutoIT forum!

print now

ss: func [z][x: 1 loop 100000000 [x: x + 1] ]

do ss 1

print now

you just need to copy the above code to rebol's console.

Rebol is also powerful in many aspects, but I think its grammar is strange, it may be hard to use. but I still believe Autoit has a lot to learn from rebol.

Gear

If you need speed, the program in C,C++ or even better in Assembly!

BTW: I applied some optimization techniques to your code. Actually I converted the code to C, then I compiled it with maximum optimization enabled and told the compiler to generate assembly code. By using a "reverse" compiler I generated C code from the optimized assembly code, which I then converted back to AutoIT.

Here is the result. It does exactly the same as your code and takes only 0.00000530793718196028 seconds to run. Now, beat THAT with rebol!!!

$begin = TimerInit()

$i=100000000  ; <== OPTIMIZED VERSION OF YOUR CODE !!

$dif = TimerDiff($begin)/1000
MsgBox(1,"",$dif)

__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

Link to comment
Share on other sites

the trade off is... you don't have to stare at syntax like...

print now
ss: func [z] [x: 1 loop 100000000 [x: x + 1] ]
do ss 1
print now
syntax?? You think that is source code??

__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

Link to comment
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
 Share

  • Recently Browsing   0 members

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