I sorta expected it due to the new V8, Tracemonkey, Nitro, and SquirrelFish engines. But I’m thinking of making a port of ShinyTouch to JS and I was looking into what differences it might end up as.
I have to say I’m really quite suprised. It’s a simple piece of code:
setTimeout(function(){
var start = (new Date).getTime();
var n = 0;
for(var i = 0; i < 10000000; i++){
n += i;
}
var end = (new Date).getTime();
alert(end-start);
},5000)
Just doing a loop a huge number of times and adding some numbers. But the unscientific results are quite amazing:
Python: 2640, 2110, 2000, 2190
Firefox 3.0 Spidermonkey: 777, 672, 685, 665
Firefox 3.5 TraceMonkey: 659, 365, 629, 629
Chromium Nightly: 146, 150, 147, 152
While these only test basic arithmetic and recursion, The browser is 15 times faster than Python, it just feels quite incredable.
I’d be interested to see the performances of V8 compared to another famous virtual machine: the JVM.
That would be quite interesting, but JVM would probably be faster.
Me gusta mucho!!.
Artificial vision
He experimentado
http://aamap.110mb.com/graficos/canvas/canvas05.htm
Cool1
you ever try adding -O when you execute you rpython scripts to use just in time compilation? makes a huge difference depending on what your doing.