Skip to main content.

Archives

This is the archive for 25 April 2008

Friday, April 25, 2008

Yesterday I did a bit of speed tests.

I stacked up many things in the main VM loop, as i.e. preemption in functional context, end-frame callbacks, and even the generic vector as stack; and it was long since I did an empty loop speed test.

I run the following (pseudo) code:

a = 0
for num in [0:100000000]
a = a + 1
end

Here are the results, using "time", for several scripting engines:

C: 0m0.257s (gcc -O0)
LUA: 0m8.021s
Falcon: 0m9.776s
PHP5: 0m14.923s
Python: 0m22.576s
Perl: 0m27.068s
Ruby: 1m25.947s


Now; an empty loop test doesn't mean anything in terms of overall performance, but it's nice to see we have one of the fastest VM loops around... when it's still heavily under-optimized!