Comment #16 on issue 1630 by alonmozi...@gmail.com: Compiled raytrace code
is very slow
http://code.google.com/p/v8/issues/detail?id=1630
In your example the array is only 20% occupied.
If the entire array is used,
var v = Array(52428800);
var da = 52428800;
for (var D = 0; D < da; D++)
{
v[D] = 0;
}
Then SpiderMonkey and JavaScriptCore are fast, but V8 works for while and
them OOMs.
If the first line is replaced with
var v = [];
or {} then V8 is 3 times slower, but does complete successfully.
So I'm not sure how to work around this problem in Emscripten, in the best
case V8 is three times slower than other JS engines. I will switch to []
from new Array however since that helps. (Shouldn't calling new Array help
though, since it hints at the correct size?)
--
v8-dev mailing list
v8-dev@googlegroups.com
http://groups.google.com/group/v8-dev