   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.4In a 100 runs I get folowing results.Time is in microseconds.---------------------------------------------------------squ--------angel----ratio---------------------------------------------------------time in microsecondsCalling void function from c/c++ to script 10000times    3894   90453    003Calculating first 30 fibonacii nums in script  1527859398040   3.99Computing 100000 float math divisions/multiplications    47549  31603    1.58Script calls another script void function 100000 times   47347  17613   2.81   Integer math storing the results into 1000 int array429811 528918  0.8510000 calls to C/C++ function passing an integer    10056  1604    6.2410000 calls to C/C++ function passing a 32 chars string  9891   8484    1.17--------------------------------------------------------------------------------[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.   ;  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++.   ;  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->scriptscript->script and script->cProject can be imported in code::blocks NP.I zipped the whole structure dir with libs and headers. The exe is gen in /_binAll libs are generated in /_libIf you step in debuger make sure you set the exeutable pathto ../_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 :-)   ;  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 PosterPretty much a year ago, we had this thread: http://www.gamedev.net/community/forums/topic.asp?topic_id=311655&forum_id=41&gforum_id=0Didn'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   