I don't remember being dismissive at Lua performances, although it's true that on nekovm.org/faq it's listed together with PHP/ Python in the "pretty slow runtime" category. That might be a bit unfair and Lua might have its own category ;)

I'm sure you didn't mean to be dismissive, but I don't understand your attitude there. If Python is in the "pretty slow runtime", then NekoVM also belongs here. Anyway, Neko's performance is satisfying, and certainly good enough for web applications. I just wanted to know if switching an app from Python to Neko would give me more performance "for free" (of course it's never as simple as that).

Intrigued by this 3 times slower difference, I ran some tests on Neko/Win32 CVS and Lua/Win32 binary (5.0.2). Both where built with MSVC so we also compare with the same C compilers :

- fibonnacci (recursion with integer calculus) ran pretty much at the same speed on both Neko an Lua.

I found it a little faster on Neko. I think there is an error in fib.neko, line 2 should be
    if( n <= 1 ) return 1;
instead of
    if( n <= 1 ) return n;

- nbodies (floating point calculus) was indeed 3x faster on Lua. I might have a look at further optimizing for such usage, although I think it's pretty rare to do heavy floating point calculus in a VM (usualy one would move such tasks on the C side).

I agree.

- fannkuch is IMHO impossible to benchmark, with < 10ms running time

I may be doing something wrong but I got the following results with N=10
ocaml   1.18s
java    2.95s
lua    47.21s
neko 1m43s
python 2m48s

- binary-trees where 3.5 times faster in Neko than in Lua. This benchmark mesure integer calculs, function call overhead, and allocation of small objects. It's IMHO the most "generic" benchmark among these 4.

I got the same results and Neko is really fast here.


- as for the "sum-file" benchmark, I didn't try to run it, but I think it's mainly measuring the C implementation of the readline() primitive. If you use some C code similar that the one Lua is using, I think you should get pretty much the same results.

I don't doubt it.

You might want to add a part for defining PPC registers. For example :

Note that I don't know anything about this, is it worth testing for eventual inclusion in the default Neko distribution?

Anyway, I'm going to find something more interesting as a test, but I'm not a performance freak, I'm just trying to get a feel of how often you have to write C code to make things fast. I'd rather not write C at all.

Cheers,

Alex

--
Neko : One VM to run them all
(http://nekovm.org)

Reply via email to