Thus, I really want to see Native Client succeed, as it neatly jumps to a world where it's possible to have code within 5-10% of the performance of native code, securely deployed on the web. I wrote a slightly inflammatory post about why the web should compete at the same level as native desktop applications, and why Native Client is important for getting us there.
First, the code is on github.
- C++ w/ SSE intrinsics: 98.3
- C++ w/ scalars: 61.2
Finally, if you want to track Mozilla's investigation into this benchmark, here is the bug. I'm excited to see what they can do.
In a modern game engine that SSE version would also run in parallel across all HW threads to further improve performance and reduce latency.
Would be interesting to add that to the benchmark test as well :) Ideally on say a quad core which a lot of gamers have.
Looks like the SSE copyright notice is in the wrong cpp file... :)
Thanks for the benchmark! I wasn't even aware of types arrays until now. I made a version of jsmem for typed arrays (Float64), and get only about 25% performance gain, vs 64% in your case. But at least the curve looks much less ragged (among the browsers I tested, only FF4 has the "ragged" problem which probably means that the numbers are allocated as objects, and there is a lot of GC activity):
Not even going two times faster when vectorizing floats? Looks like you didn't do it right...