AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

autoIT versus autohotkey
Goto page Previous  1, 2, 3 ... 13, 14, 15, 16  Next
 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> General Chat
View previous topic :: View next topic  
Author Message
pwnage
Guest





PostPosted: Thu Jul 03, 2008 5:31 pm    Post subject: Reply with quote

Code:
; AutoIt
$i=0
$F = DllCall("Kernel32.dll", "Int", "QueryPerformanceFrequency", "int64*", "")
$S = DllCall("Kernel32.dll", "Int", "QueryPerformanceCounter", "int64*", "")
While $i<>10000000
   $i=$i+1
WEnd
$E = DllCall("Kernel32.dll", "Int", "QueryPerformanceCounter", "int64*", "")
MsgBox(0,"",($E[1] - $S[1])/$F[1])


Result from AutoIt
CPU Usage : 50%
Mem Usage : 4,260K
Elapsed Time : 24.9107499785605 (Secs)




Code:
;AutoHotkey
SetBatchLines, -1
DllCall("QueryPerformanceFrequency", "Int64*", F)
DllCall("QueryPerformanceCounter", "Int64*", S)
Loop, 10000000
    i++
DllCall("QueryPerformanceCounter", "Int64*", E)
MsgBox % (E - S) / F


Result from AutoHotkey
CPU Usage : 50%
Mem Usage : 3,856K
Elapsed Time : 6.450900 (Secs)



"AutoIt is 4x slower" is my answer
Back to top
trik



Joined: 15 Jul 2007
Posts: 1318

PostPosted: Thu Jul 03, 2008 9:32 pm    Post subject: Reply with quote

While() not only loops, but also checks for the expression to be true. I think for a fair comparison, that AHK should have to use an if statement in the loop, to check if i is not equal to 1,000,000. Also, AutoIt does not have a SetBatchLines command that I am aware of.
_________________
Religion is false. >_>
Back to top
View user's profile Send private message
haichen



Joined: 05 Feb 2007
Posts: 177
Location: Osnabrück, Germany

PostPosted: Thu Jul 03, 2008 9:58 pm    Post subject: Reply with quote

exact time measurement for a 100 femtoseconds accuracy.
I like atomic clocks!! Very Happy
Back to top
View user's profile Send private message
neXt



Joined: 18 Mar 2007
Posts: 479

PostPosted: Thu Jul 03, 2008 11:26 pm    Post subject: Reply with quote

Trikster, so you are saying that he should give AutoIT a chance by slowing down AHK Wink ?
_________________
simplified csv - easy way to handle csv files.
Back to top
View user's profile Send private message
trik



Joined: 15 Jul 2007
Posts: 1318

PostPosted: Thu Jul 03, 2008 11:58 pm    Post subject: Reply with quote

Not really, I just think we should give them a level playing field Wink

Edit: I just saw the humor in your post Rolling Eyes
_________________
Religion is false. >_>
Back to top
View user's profile Send private message
pwnage
Guest





PostPosted: Fri Jul 04, 2008 1:03 am    Post subject: Reply with quote

Trikster wrote:
AutoIt does not have a SetBatchLines command that I am aware of.
If you don't use SetBatchLines, -1 AHK uses only 25% cpu while AutoIt uses 50% cpu by default. which isn't fair.

Trikster wrote:
While() not only loops, but also checks for the expression to be true.

Code:
SetBatchLines, -1
DllCall("QueryPerformanceFrequency", "Int64*", F)
DllCall("QueryPerformanceCounter", "Int64*", S)
Loop
{
    If i=10000000
        Break
    i++
}
DllCall("QueryPerformanceCounter", "Int64*", E)
MsgBox % (E - S) / F

Elapsed Time : 11.761779 (Secs)

AutoIt is still more than 2x slower even AHK brakes itself. there will be no arguments on performance comparison. AHK is much more superior to AutoIt in this area
Back to top
Guest






PostPosted: Sun Jul 06, 2008 12:19 pm    Post subject: Reply with quote

pwnage wrote:
Result from AutoIt
CPU Usage : 50%

Result from AutoHotkey
CPU Usage : 50%
pwnage wrote:
...AHK uses only 25% cpu while AutoIt uses 50% cpu by default.

...I think for CPU measurements you should note if you have either a "dual core CPU" or 2 or more CPU's...AHK using 25% CPU seems to suggest to me it's using 50% of the CPU it was given...or 50% of the "core" it was given...for example on my computer, I have 1 CPU & 1 core...so on loops like that (I have not tested yours yet) AHK would probably use 50% CPU & AutoIT would probably use 100% CPU...based on 1 CPU 1 core...

I think I would want a computer with more CPU's &/or more cores, but seeing 25% CPU usage in Task Manager when right now I would see 100% would confuse me...I think I'd want a 0%-100% scale per-CPU &/or per-core so I could easily tell when some program has pegged a CPU/core...
Back to top
corrupt



Joined: 29 Dec 2004
Posts: 2446

PostPosted: Sun Jul 06, 2008 1:49 pm    Post subject: Reply with quote

Anonymous wrote:
...I think for CPU measurements you should note if you have either a "dual core CPU" or 2 or more CPU's...AHK using 25% CPU seems to suggest to me it's using 50% of the CPU it was given...or 50% of the "core" it was given...for example on my computer, I have 1 CPU & 1 core...so on loops like that (I have not tested yours yet) AHK would probably use 50% CPU & AutoIT would probably use 100% CPU...based on 1 CPU 1 core...

I think I would want a computer with more CPU's &/or more cores, but seeing 25% CPU usage in Task Manager when right now I would see 100% would confuse me...I think I'd want a 0%-100% scale per-CPU &/or per-core so I could easily tell when some program has pegged a CPU/core...
It really doesn't make any difference if the tests are run on the same machine. You don't have much control over how multi-processor machines are going to handle the load in most cases...
Back to top
View user's profile Send private message Visit poster's website
Laszlo



Joined: 14 Feb 2005
Posts: 4510
Location: Boulder, CO

PostPosted: Sun Jul 06, 2008 3:44 pm    Post subject: Reply with quote

The main difference is that AutoIt is still actively developed.

These task-automation languages are not meant for large projects or time critical applications, so the speed is not the most important thing. AutoIt’s built in COM support, Unicode handling, data types, arrays, much better flow controls (loops, conditionals, switches), better networking support oppose AHK’s faster operation, simpler hotkey/hotstring definitions, low level hacks, and most importantly, a more helpful user community.
Back to top
View user's profile Send private message
Guest






PostPosted: Sun Jul 06, 2008 4:04 pm    Post subject: Reply with quote

i like AutoIt's versatile functionalities but i hate to see...

1) $ prefix on every single variable name
2) Start...End blocks rather than {...}
3) basic-like operators such as AND OR NOT rather than c-like operators && || !
Back to top
majkinetor



Joined: 24 May 2006
Posts: 4114
Location: Belgrade

PostPosted: Mon Jul 07, 2008 9:10 am    Post subject: Reply with quote

Laszlo wrote:
These task-automation languages are not meant for large projects or time critical applications, so the speed is not the most important thing. AutoIt’s built in COM support, Unicode handling, data types, arrays, much better flow controls (loops, conditionals, switches), better networking support oppose AHK’s faster operation, simpler hotkey/hotstring definitions, low level hacks, and most importantly, a more helpful user community.

I disagree.
Although AutoIt is more mature in every other sense then AHK except for speed, I still use AHK just for that reason. Automatition langauges aren't ment for large projects but tendency goes to large number of 10-liner or simple scritps. As either AHK or AU3 can run only 1 script this quickly evaluates to bunch of processes doing very simple tasks in the system. Performance and memory footprint soon becomes a problem, not to mention control and ugly looks in process list. If I don't have multithreading aware automatition lanugage, I can still choose to run multiple processes of the one that is the most friendly when my system is in question.

Add to that that OS generaly runs another 30 processes by default, and another 10 per user, add 10 AU3-s to that waiting for a window or automating cell operation in Excell, and u just made your double core act like 486. And if you happen to run Java or dotNet along .... you got the point.

IMO, every-day tool like AHK should be as fast as possible and as light as possible, and that is for me primary attribute. Otherwise, i would use AU3 from the day 0.
_________________
Back to top
View user's profile Send private message
Guest






PostPosted: Tue Jul 08, 2008 2:55 pm    Post subject: Reply with quote

the scripts above are purely testing the speed of asimple ahk Loop function which is totally different to a while() which evaluates a complex expression (not just a number but could be return of multiple functions)

Other tests you can try

ahk
Code:

d := A_TickCount
Counter := 0
Loop, 1000000
{
   variable := 1.5 + 2.5
}
dif := A_TickCount - d
MsgBox %dif%


aut
Code:

$d = TimerInit()
For $i = 1 to 1000000
   $variable = 1.5 + 2.5
Next
$dif = TimerDiff($d)
MsgBox(0, "", $dif)



ahk
Code:

factor := 1000000 ; put some number here
d := A_TickCount
i := 0
Loop
{
   i ++
   If i > %factor%
      Break
   Random, dummy, 1, 1000
}
stop := A_TickCount - d
Clipboard := stop
MsgBox %stop%


aut
Code:

$factor = 1000000 ; put some number here
$timer = TimerInit()
For $i = 1 to $factor
   Random(1, 1000, 1)
Next
$stop = TimerDiff($timer)
ClipPut($stop)
MsgBox(0, "", $stop)
Back to top
n-l-i-d
Guest





PostPosted: Tue Jul 08, 2008 4:13 pm    Post subject: Reply with quote

Code:
Counter := 0

... in your first AHK code is not needed, and you can replace the i values in your second AHK code example with A_Index. If you use the SetBatchLines -1 command in the AHK sections, is the AU3 code really faster?

A loop is a loop is a loop, whether you use a simple loop form with options, or a multitude of variations (for/while).
Back to top
arana
Guest





PostPosted: Thu Jul 10, 2008 3:57 pm    Post subject: Reply with quote

i have never used any of AUTOIT or AHK
i was looking for info in order to decide.
just by reading those guest posts bashing everyone , and asking for more credit i have made my mind alredy.

even that i had never used any of the two, just by simple google searching for info on both i noticed that AHK had some AUTOIT influence, and after just a couple of minutes i even noticed they were credited in many parts.
at one point i even thought they where brother projects (seeing the references of autoit in ahk alone)

then i went to autoit forums and omg!!!!
they dont seem to make them look like brother projects at all

as far as credit goes in GPl or other type of open licenes
if you follow the ruls you are good to go.

i say this as a programmer . users could;nt care less about who made what, they want a usable app period.

programmers on the other hand like to be credited (im ok with that)
but as someone said, it is enough to have a mention in the code that that piece of code was taken from elsewhere and then look the appropiate documentation if you really want to find more about it, i DO NOT like to edit code where half the content is credits 1/4 remarks and the other 1/4 code, that complicates readability a lot
if i am somehow interested in sending flowers to the original , then and only then will i look at the docuemtnation in order to find who he is, what his name is, whre does he live, and what color he likes his flowers.

but since I COULDNT care less either, dont expect any flowers any soon.

better try to make a better product adn then the people who care about credits will start wanting to know about the original coders.
Back to top
Slanter



Joined: 28 May 2008
Posts: 739
Location: Minnesota, USA

PostPosted: Thu Jul 10, 2008 10:11 pm    Post subject: Reply with quote

@arana - Nice rant, would you mind explaining what you just said in a way that isn't quite that confusing and disjointed? Most of that seemed to be you getting pissed off about credits/comments in a code that you will probably never even look at.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> General Chat All times are GMT
Goto page Previous  1, 2, 3 ... 13, 14, 15, 16  Next
Page 14 of 16

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group