AutoHotkey Community

It is currently May 27th, 2012, 12:05 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 45 posts ]  Go to page Previous  1, 2, 3
Author Message
 Post subject:
PostPosted: May 24th, 2011, 9:45 pm 
Offline
User avatar

Joined: August 23rd, 2010, 6:22 pm
Posts: 781
Location: Ontario, Canada
Without benchmarking, we can look at the actions that are taking place:

MCode Preparation:
  • Convert hex to binary in memory
  • Mark the execute bit on the memory pages (if necessary)
MCode Execution:
  • DllCall() to execute machine code

DLL Preparation:
  • LoadLibrary() call reads DLL file into memory
  • GetProcAddress() call to obtain the pointer to the function to be called

DLL Execution:
  • DllCall() to execute machine code


Assuming the machine code of each method is equivalent, the execution times should be the same. However, because the LoadLibrary() call needs to read the DLL from the disk or the cache, it is going to be quite a bit slower than the MCode preparation (I'm assuming you're using the version of MCode implemented in ASM itself).

Basically, if preparation times don't matter, go for DllCall()'s, and use LoadLibrary() and GetProcAddress() for your functions. I would personally go for MCode if the other way needed an extra DLL, though.

_________________
AutoHotkey.net | GitHub

My default license.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 25th, 2011, 12:47 am 
Offline
User avatar

Joined: November 2nd, 2008, 4:23 pm
Posts: 2906
Location: 127.0.0.1
Thanks :D

_________________
aboutscriptappsscripts
Any code ⇈ above ⇈ requires AutoHotkey_L to run


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 23rd, 2011, 7:40 pm 
Offline
User avatar

Joined: August 23rd, 2010, 6:22 pm
Posts: 781
Location: Ontario, Canada
Update:

Seems that I forgot to update the forum post for a little while - busy with vacation and all that. For the most timely of updates, you may watch the repository at GitHub.

Since release numbers are a lot more consistent now, and due to the shorter release cycle, I will only be running the entire benchmark suite at each minor version number change (i.e., 1.1.NN.00) or above, as the micro number will usually not have too great an impact on performance.

This update brings it back with an updated combined benchmark and benchmarks for 1.1.02.00.

_________________
AutoHotkey.net | GitHub

My default license.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 6th, 2011, 1:28 am 
Offline
User avatar

Joined: August 23rd, 2010, 6:22 pm
Posts: 781
Location: Ontario, Canada
Update:

  • Benchmarks for AHKv1.1.03.00 added.
  • Combined benchmark updated to AHKv1.0.48.05 and AHKv1.1.03.00.
  • Move to GitHub Pages planned.

_________________
AutoHotkey.net | GitHub

My default license.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 18th, 2011, 11:27 pm 
Offline
User avatar

Joined: August 23rd, 2010, 6:22 pm
Posts: 781
Location: Ontario, Canada
Update:

  • Benchmarks for AHKv1.1.04.01 added.
  • Moved to GitHub pages! Links should now always be up to date. The AutoHotkey.Net links will be up for a few more days, and then I will take them down. Edit: done

_________________
AutoHotkey.net | GitHub

My default license.


Last edited by Uberi on October 2nd, 2011, 11:00 pm, edited 1 time in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 19th, 2011, 12:47 am 
Offline

Joined: October 7th, 2006, 4:50 pm
Posts: 3157
Location: MN, USA
:idea: How about adding something (highlight, bold, underline, etc.) to identify which score is fastest for each test? Maybe even a column that calculates the difference? Some coloration would probably be enough.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 20th, 2011, 10:22 pm 
Offline
User avatar

Joined: August 23rd, 2010, 6:22 pm
Posts: 781
Location: Ontario, Canada
Good idea! I've added it to the combined benchmark, and it will automatically be done from now on by the benchmark combining script.

Now the faster of the two will be bolded slightly.

_________________
AutoHotkey.net | GitHub

My default license.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 17th, 2011, 8:41 pm 
Offline
User avatar

Joined: August 23rd, 2010, 6:22 pm
Posts: 781
Location: Ontario, Canada
Update:

  • Just realized I forgot to update the forum post to include AHKv1.1.05.00. Now added.
  • Combined benchmark updated.
  • Reran AHKv1.0.48.05 benchmark.

_________________
AutoHotkey.net | GitHub

My default license.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 12th, 2012, 6:18 pm 
Offline
User avatar

Joined: August 23rd, 2010, 6:22 pm
Posts: 781
Location: Ontario, Canada
Added benchmark results for AHK v1.1.06.01, and a new combined benchmark view.

_________________
AutoHotkey.net | GitHub

My default license.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 12th, 2012, 7:45 pm 
Offline

Joined: June 7th, 2010, 3:40 pm
Posts: 553
Benchmarks from my laptop:
v1.0.48.05 x86 ANSI - Basic
v1.1.05.06 x64 Unicode - L
v1.1.05.06 x86 ANSI - L
v1.1.05.06 x86 Unicode - L

Benchmarks from my desktop:
v1.0.48.05 x86 ANSI - Basic
v1.1.05.06 x64 Unicode - L
v1.1.05.06 x86 ANSI - L
v1.1.05.06 x86 Unicode - L

_________________
(Statistics script) M&K Counter 2.0
My FAST ini Lib
Minecraft NBT Lib


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 12th, 2012, 9:12 pm 
Offline

Joined: May 23rd, 2009, 4:48 am
Posts: 365
Location: north bay, california
Nice work, how about a bbcode output so this thread (or another) could be a repository for ppl's results

_________________
Notify() | Compile() | Instance() | LV_Group()
EitherMouse
Recommended: AHK_L (don't forget its a superset of _Basic)


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 12th, 2012, 9:57 pm 
Offline
User avatar

Joined: August 23rd, 2010, 6:22 pm
Posts: 781
Location: Ontario, Canada
gwarble wrote:
Nice work, how about a bbcode output so this thread (or another) could be a repository for ppl's results


That is possible, but GitHub is already being used as a repository for all benchmark results, and it supports version control and easy collaboration.

You can view the project here:

GitHub.com

_________________
AutoHotkey.net | GitHub

My default license.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 14th, 2012, 3:32 am 
Offline
User avatar

Joined: August 23rd, 2010, 6:22 pm
Posts: 781
Location: Ontario, Canada
Thanks for your contributions, Rseding91! Very thorough and comprehensive :).

I've added your benchmark results to the first post and they are also available at the repository for viewing.

_________________
AutoHotkey.net | GitHub

My default license.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 3rd, 2012, 10:51 pm 
Offline

Joined: July 31st, 2008, 10:27 pm
Posts: 336
From my Laptop. I havee an SSD, so the file times look pretty good. :)
v1.0.48.05 x86 ANSI - Basic


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 3rd, 2012, 11:03 pm 
Offline
User avatar

Joined: August 23rd, 2010, 6:22 pm
Posts: 781
Location: Ontario, Canada
Thanks, I've added them to the first post. Useful to know the speed variations to expect when using SSDs.

_________________
AutoHotkey.net | GitHub

My default license.


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

All times are UTC [ DST ]


Who is online

Users browsing this forum: notsoobvious and 11 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