As i searched V8 and SpiderMonkey benchmark.
Always V8 won in many tests.
e.g ) http://favo.asia/2012/01/v8-vs-spidermonkey/
Also i tested very simple fibonaci benchmark.
function fib(n) {
if(n 0 || n 1)
return 1
return fib(n - 1) + fib(n - 2);
}
>
function start(f) {
>
t = new Date();
f();
print (“time”, new Date() - t, ‘ms\n’);
}
start(function () { fib(38); });
>
SpiderMonkey based js shell result: time 45489ms
V8 shell node result: time 538 ms
SpiderMonkey is about 84 slower in this simple task.
And V8 has easier API and examples and docs.
I didn’t get why cocos2d-x team choose SpiderMonkey as js bindings.
Could you explain why?