---------------------------------------------------------squ--------angel----ratio
---------------------------------------------------------time in microseconds
Calling void function from c/c++ to script 10000times 3894 90453 003
Calculating first 30 fibonacii nums in script 1527859 398040 3.99
Computing 100000 float math divisions/multiplications 47549 31603 1.58
Script calls another script void function 100000 times 47347 17613 2.81
Integer math storing the results into 1000 int array 429811 528918 0.85
10000 calls to C/C++ function passing an integer 10056 1604 6.24
10000 calls to C/C++ function passing a 32 chars string 9891 8484 1.17
--------------------------------------------------------------------------------
Benchmarks
P4 2.4 Ghz, 1GRam, win2k sp3, microsft c++ vc7 compiler 2003 edition,
nonoptimized code/release build, multithreaded libraries scrip libs
statically linked.
I ran some tests comparing SQUIRREL2_1_0 and angelscript_2.4
In a 100 runs I get folowing results.
Time is in microseconds.
[Edited by - Marius on May 26, 2006 12:00:07 PM]
Thanks for this, it's very interesting.
I have been looking for a good comparison between AS and SQ as I am going to need a scripting interpreter in a performance-intense application very soon.
I have been looking for a good comparison between AS and SQ as I am going to need a scripting interpreter in a performance-intense application very soon.
What the!? 9ms to call a funcion in AS (from C/C++ that is)? Am I the only one who thinks that sounds kinda much? Can you please post that benchmarking code? I have to see if the same thing happends with later versions as well..
No, that's 9 microseconds.
1000 microseconds = 1 millisecond. Each call took 9 microseconds, or 0.009 milliseconds.
And, no, it's not a lot. The overhead of asIScriptContext::prepare is well known. It's doing a lot of work. And, as you can see, AS trumped it in most of the other tests - most noticably the calls back into C++.
1000 microseconds = 1 millisecond. Each call took 9 microseconds, or 0.009 milliseconds.
And, no, it's not a lot. The overhead of asIScriptContext::prepare is well known. It's doing a lot of work. And, as you can see, AS trumped it in most of the other tests - most noticably the calls back into C++.
Yes, sorry, my bad.. I was absolutely sure it was measured in milliseconds.. While I do understand it takes time to prepare and things, 9ms seemed extreme.. 9µs however isn't very much at all.. Again, thanks for pointing this out, I'll read more closely before I make a statement next time (rating-- on self :p)..
Here is the whole project: vc7(2003).
Ia a bit messy, (...) math float tests have room of improvement.
I was interested in call times between c->script
script->script and script->c
Project can be imported in code::blocks NP.
I zipped the whole structure dir with libs and
headers. The exe is gen in /_bin
All libs are generated in /_lib
If you step in debuger make sure you set the exeutable path
to ../_bin couse the dumb vc7 holds the absolute path.
BM_.rar
[Edited by - Marius on May 26, 2006 3:10:26 PM]
Ia a bit messy, (...) math float tests have room of improvement.
I was interested in call times between c->script
script->script and script->c
Project can be imported in code::blocks NP.
I zipped the whole structure dir with libs and
headers. The exe is gen in /_bin
All libs are generated in /_lib
If you step in debuger make sure you set the exeutable path
to ../_bin couse the dumb vc7 holds the absolute path.
BM_.rar
[Edited by - Marius on May 26, 2006 3:10:26 PM]
Yes, this is pretty interesting-however it might be more representative and also more informative if there was some sort of wider comparison. For example, we could not only extend the current test suite but also the scripting languages supported, Lua, Perl, Python and Ruby would seem like ideal candidates for such a comparison-what do you think?
This would certainly show those areas in AngelScript and Squirrel that are superior or inferior compared to the mainstream scripting languages.
Just an idea :-)
This would certainly show those areas in AngelScript and Squirrel that are superior or inferior compared to the mainstream scripting languages.
Just an idea :-)
Pretty much a year ago, we had this thread: http://www.gamedev.net/community/forums/topic.asp?topic_id=311655&forum_id=41&gforum_id=0
Quote:Original post by Anonymous Poster
Pretty much a year ago, we had this thread: http://www.gamedev.net/community/forums/topic.asp?topic_id=311655&forum_id=41&gforum_id=0
Didn't see any benchmarks there...
Cool! [grin]
This really shows me where I have to spend some time optimizing the code for AngelScript. :)
I'll also take a look at that benchmark code you have, to see if you're doing everything the optimal way. ;)
Regards,
Andreas
This really shows me where I have to spend some time optimizing the code for AngelScript. :)
I'll also take a look at that benchmark code you have, to see if you're doing everything the optimal way. ;)
Regards,
Andreas
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement