Sunday, November 16, 2008

is the neko vm too slow to be used?

So I've been having a lot of haxe fun lately, but mostly in the flash direction.

But of course, haxe has another face, the server / fat-client side which is neko vm (or php).

Since I think haxe is neat, and I have been playing with the idea of a small abstraction layer to write stuff to use flash apis or openGL I wanted to see what the neko vm was like.

Well... I was a little bummed that I couldn't find anything "official", but not really surprised since it's not exacty in the top 10 list.

I decided to try the olde "Sieve of Eratosthenes" test which is generally regarded as a very naive, worthless and very easy to implement benchmark.

At this point you probably see where this is going...

sieve.c 1.542s
Sieve.java 2.899s
Sieve.hx to Flash 7.404s
Sieve.hx to Neko 20.039s
Sieve.hx to JS* 22.799s

Ouch! Of course, we can't expect the neko vm to really compete with the Java 6 JVM, but a 7x spanking really makes it look bad!

Getting spanked by Flash a 2.5x is not too impressive either... or barely beating out Javascript...

As blackdog points out, a path from haxe to the JVM may just make a lot more sense.

Unfortunately, at this point there isn't a way to get from haxe to the JVM and getting to the neko vm doesn't seem worth the bother...

:-(

BTW, I generated the php version, but couldn't get it to crank up... May add in the results later.

No comments:

Post a Comment