Comment #6 on issue 2097 by [email protected]: sha1 compiled with
Emscripten runs 10X slower than with SpiderMonkey
http://code.google.com/p/v8/issues/detail?id=2097
I've spent the afternoon investigating a number of performance issues when
using Uint32Arrays in my code and trying to track down the cause of some of
the deopts.
I created a simple test case on jsperf.com to highlight the difference in
behaviour:
http://jsperf.com/uint8array-assignment (please ignore the slug - it is
testing Uint32Array, not Uint8Array)
Setup:
var arr = new Uint32Array(3);
arr[0] = 0;
arr[1] = 0x80000000;
arr[2] = 0x7fffffff;
Test1: arr[0] = arr[1]; // assign 32-bit value
Test2: arr[0] = arr[2]; // assign 'small int'
Test1 executes around 10x slower on my laptop running Chrome 22.0.1192.0
canary. I get around 58 million ops/second for Test1, and 622 million
ops/second for Test2.
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev