AutoHotkey Community

It is currently May 25th, 2012, 1:59 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 28 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: August 2nd, 2007, 4:38 pm 
Offline

Joined: September 23rd, 2006, 1:58 pm
Posts: 149
In the "Ask for Help" section we found out that faster Computers may not neccessary compile AHK-code faster.

We found the same script to be compiled on a
700Mhz-P3-256MB-Computer in 2163 milliseconds and on a
2GHz-P4-512MB-Computer in 11750 milliseconds.
Chris said:
Quote:
If a short script takes longer than expected (more than 5 seconds on an ultrafast CPU), it might be because the code is currently optimized to be small in size. It's also optimized for a mixture of old and new CPUs (Pentium and Pentium 2/3/4+).

Therfore Chris was so kind to provide us with 2 more compilers:
(removed, obsolete)

I made this little script to easily test the performance of the different compilers:
Code:
code removed due to protest.
http://www.autohotkey.com/forum/viewtopic.php?t=81795


You need to copy the two new compilers in the compiler-folder of ahk, to make the script work. Then you´re ready to choose your weapon of choice :wink:


I have compiled the following test-script on my Computer (700Mhz-P3 256MB) to give you a reference:
Code:
Target = www.google.de
Run, cmd /c tracert %Target% > MyPing.txt
FileRead, FileContent, MyPing.txt
run , MyPing.txt

Quote:
Time for standard compiler with UPX (in ms): 2674
Time for FavorFast compiler with UPX (in ms): 2283
Time for FavorFast-Pentium4orHigher compiler with UPX (in ms): 2313
Time for standard compiler without UPX (in ms): 741
Time for FavorFast compiler without UPX (in ms): 701
Time for FavorFast-Pentium4orHigher compiler without UPX (in ms): 661

Please post your result for compiling the above script, too.


Last edited by Zed Gecko on January 28th, 2012, 3:22 am, edited 1 time in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 2nd, 2007, 4:48 pm 
Offline

Joined: November 2nd, 2004, 2:43 pm
Posts: 1019
Location: London, UK
Compiling the same test script produced

Quote:
Time for standard compiler with UPX (in ms): 1110
Time for FavorFast compiler with UPX (in ms): 890
Time for FavorFast-Pentium4orHigher compiler with UPX (in ms): 891
Time for standard compiler without UPX (in ms): 359
Time for FavorFast compiler without UPX (in ms): 344
Time for FavorFast-Pentium4orHigher compiler without UPX (in ms): 344


This was an intel core 2 running at 2 gig

_________________
Steve F AKA Superfraggle

http://r.yuwie.com/superfraggle


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 2nd, 2007, 5:09 pm 
Offline
User avatar

Joined: August 30th, 2005, 8:43 pm
Posts: 8649
Location: Salem, MA
P4 2.26GHz 256MB memory

Quote:
Time for standard compiler with UPX (in ms): 1583
Time for FavorFast compiler with UPX (in ms): 1212
Time for FavorFast-Pentium4orHigher compiler with UPX (in ms): 1282
Time for standard compiler without UPX (in ms): 381
Time for FavorFast compiler without UPX (in ms): 360
Time for FavorFast-Pentium4orHigher compiler without UPX (in ms): 411

_________________
Image
(Common Answers) - New Tutorials Forum - Humongous FAQ


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 3rd, 2007, 4:08 pm 
Offline

Joined: April 28th, 2004, 1:12 pm
Posts: 349
It must require the latest version of Autohotkey because I couldn't get it to work properly at first. (it would only give the first result)

Code:
Time for standard compiler with UPX (in ms): 3734
Time for FavorFast compiler with UPX (in ms): 3563
Time for FavorFast-Pentium4orHigher compiler with UPX (in ms): 3484
Time for standard compiler without UPX (in ms): 515
Time for FavorFast compiler without UPX (in ms): 438
Time for FavorFast-Pentium4orHigher compiler without UPX (in ms): 453


AMD Sempron 2600+

1gb memory


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 3rd, 2007, 6:02 pm 
Offline

Joined: March 29th, 2007, 11:08 pm
Posts: 12
Location: Damascus, Syria
Here is my result:

Code:
Time for standard compiler with UPX (in ms): 3515
Time for FavorFast compiler with UPX (in ms): 1594
Time for FavorFast-Pentium4orHigher compiler with UPX (in ms): 1219
Time for standard compiler without UPX (in ms): 1422
Time for FavorFast compiler without UPX (in ms): 1281
Time for FavorFast-Pentium4orHigher compiler without UPX (in ms): 1422


Pentium 4 3.0Ghz


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 5th, 2007, 4:18 am 
Offline

Joined: October 17th, 2006, 4:15 pm
Posts: 7501
Location: Australia
Very strange how much variance you guys are getting... My results were:
Quote:
Time for standard compiler with UPX (in ms): 1328
Time for FavorFast compiler with UPX (in ms): 1078
Time for FavorFast-Pentium4orHigher compiler with UPX (in ms): 1016
Time for standard compiler without UPX (in ms): 859
Time for FavorFast compiler without UPX (in ms): 1000
Time for FavorFast-Pentium4orHigher compiler without UPX (in ms): 1047
They all seem fairly much the same. :?

Athlon XP 3000+
1 GB RAM
Vista

Edit: Looks like Vista's caching something. I ran the test again, on a much larger (~600 lines vs 4 lines) script, and all the results were in the 950-1050 ms range. Looking closer at your results, the difference seems to be in UPX/no UPX. Strange that UPX makes very little difference to mine...

How big should the resulting exes for that 4-line test script be?

Edit2: Err.. there's no size difference between the UPX/no UPX exes. :(

Edit3: Okay, this is weird. I tried manually compressing the .exes with upx, and it fails because they're "already packed by UPX" - even the "without UPX" exes!

They're all 196 KB.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 5th, 2007, 3:15 pm 
This is indeed weird,
on my machine the upx-compressed testfiles are 196KB and the non-compressed are 399KB.


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: August 5th, 2007, 4:48 pm 
Offline
User avatar

Joined: August 30th, 2005, 8:43 pm
Posts: 8649
Location: Salem, MA
Z Gecko wrote:
This is indeed weird,
on my machine the upx-compressed testfiles are 196KB and the non-compressed are 399KB.

mine were the same on my XP computer at work. I will try my home Vista machine.

Edit:
I get some funny error about it not being able to find "C:\iLib", but only on the special AHK2Exe files.

Edit2:
Once I created the file (empty), I was able to get this
Quote:
Time for standard compiler with UPX (in ms): 1997
Time for FavorFast compiler with UPX (in ms): 1747
Time for FavorFast-Pentium4orHigher compiler with UPX (in ms): 1872
Time for standard compiler without UPX (in ms): 1825
Time for FavorFast compiler without UPX (in ms): 1794
Time for FavorFast-Pentium4orHigher compiler without UPX (in ms): 1934


AMD Turion 64bit dual core with 2GB ram on Vista (32 bit). Tested in battery saver mode (0.8Ghz)

At full speed (1.8GHz), I get:
Quote:
Time for standard compiler with UPX (in ms): 842
Time for FavorFast compiler with UPX (in ms): 827
Time for FavorFast-Pentium4orHigher compiler with UPX (in ms): 904
Time for standard compiler without UPX (in ms): 827
Time for FavorFast compiler without UPX (in ms): 890
Time for FavorFast-Pentium4orHigher compiler without UPX (in ms): 874

_________________
Image
(Common Answers) - New Tutorials Forum - Humongous FAQ


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 5th, 2007, 5:42 pm 
Offline

Joined: March 16th, 2005, 10:33 pm
Posts: 968
Location: Frisia
Quote:
Time for standard compiler with UPX (in ms): 4891
Time for FavorFast compiler with UPX (in ms): 4578
Time for FavorFast-Pentium4orHigher compiler with UPX (in ms): 4516
Time for standard compiler without UPX (in ms): 2578
Time for FavorFast compiler without UPX (in ms): 2609
Time for FavorFast-Pentium4orHigher compiler without UPX (in ms): 2625


Athlon XP 2800+
512 MB RAM
Win2k

_________________
Image mirror 1mirror 2mirror 3ahk4.me • PM or Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 5th, 2007, 7:50 pm 
Offline

Joined: June 26th, 2006, 6:14 pm
Posts: 1379
Location: USA
Quote:
Time for standard compiler with UPX (in ms): 3671
Time for FavorFast compiler with UPX (in ms): 3625
Time for FavorFast-Pentium4orHigher compiler with UPX (in ms): 3672
Time for standard compiler without UPX (in ms): 515
Time for FavorFast compiler without UPX (in ms): 500
Time for FavorFast-Pentium4orHigher compiler without UPX (in ms): 547


OS Name Microsoft Windows XP Professional
Version 5.1.2600 Service Pack 2 Build 2600
System Type X86-based PC
Processor x86 Family 6 Model 14 Stepping 12 GenuineIntel ~1828 Mhz
Processor x86 Family 6 Model 14 Stepping 12 GenuineIntel ~1828 Mhz
Total Physical Memory 2,048.00 MB

(Dual Core)

Was not on AC Power.


Same Machine On AC Power
Quote:
Time for standard compiler with UPX (in ms): 2031
Time for FavorFast compiler with UPX (in ms): 2110
Time for FavorFast-Pentium4orHigher compiler with UPX (in ms): 1984
Time for standard compiler without UPX (in ms): 375
Time for FavorFast compiler without UPX (in ms): 391
Time for FavorFast-Pentium4orHigher compiler without UPX (in ms): 390


Last edited by ahklerner on August 5th, 2007, 8:46 pm, edited 1 time in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 5th, 2007, 8:32 pm 
Offline
User avatar

Joined: December 26th, 2005, 4:40 pm
Posts: 8775
Quote:
Time for standard compiler with UPX (in ms): 1344
Time for FavorFast compiler with UPX (in ms): 1094
Time for FavorFast-Pentium4orHigher compiler with UPX (in ms): 1219
Time for standard compiler without UPX (in ms): 453
Time for FavorFast compiler without UPX (in ms): 390
Time for FavorFast-Pentium4orHigher compiler without UPX (in ms): 422


AMD Sempron 1.4Ghz / 256MB Ram / Win XP SP2

:)


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 6th, 2007, 8:12 pm 
Offline
User avatar

Joined: December 29th, 2004, 1:28 pm
Posts: 2541
Interesting... Out of curiousity, what's the purpose of trying to speed up the compiling process (which isn't really "compiling" per se...) ?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 6th, 2007, 10:10 pm 
Offline
User avatar

Joined: August 30th, 2005, 8:43 pm
Posts: 8649
Location: Salem, MA
mostly this was a test since it was REALLY slow on someone's PC.

_________________
Image
(Common Answers) - New Tutorials Forum - Humongous FAQ


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 6th, 2007, 10:15 pm 
Well, it started in the help-section where someone complained about the long "compiling"-time.
As far as I know, there is (or better was) no hint in the documentation or the forum how long it normaly takes to "compile" a script.
So i made the script, to give kind of a reference on how long it takes.
The rest was pure curiosity :oops:


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: August 6th, 2007, 11:17 pm 
Offline

Joined: March 2nd, 2004, 3:36 pm
Posts: 10720
Thanks for the results. I'll put the favor-fast-code optimization into effect in the next release because it's slightly faster for most people, and (ironically) smaller in code size than the original favor-small-code version.


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 28 posts ]  Go to page 1, 2  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 18 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group