Comment #12 on issue 1630 by [email protected]: Compiled raytrace code is very slow
http://code.google.com/p/v8/issues/detail?id=1630

Emscripten can compile code in various modes. One of the modes uses typed arrays, which is often faster, but has the obvious limitation that it will not run in all browsers. Another mode, the default, does not use typed arrays at all, so it might be slower but it will run everywhere (and, surprisingly, it is sometimes faster too). I think both modes are interesting and it would be great if all JS engines ran all modes quickly.

The 2 benchmarks here are compiled using the *default* mode - there are no typed arrays in them. They are compiled with an earlier version of Emscripten but that would not make a difference here (since typed arrays are not used here, so typed array detection code would not affect this).

The issue is still present in V8 trunk, I checked again now with the two attached benchmarks,

raytrace
v8 15.204 seconds
sm  2.086 seconds

fasta
v8  9.969 seconds
sm  1.137 seconds

So v8 is about 8 times slower.

As for the typed array mode, Emscripten detects and uses typed arrays properly in Chrome now. For example, the Broadway H264 demo uses typed arrays and it runs nice and fast in Chrome, http://mbebenita.github.com/Broadway/broadway.html (However, the d8 shell doesn't have all the typed array stuff that Chrome has, so the Emscripten console benchmarks get confused, that is issue 1822 as mentioned earlier.)


--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to