Comment #5 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 think we should be able to avoid deoptimizations without full complex uint32 support: we just need to distinguish uses of uint32 that are "bitwise":

var a = uint32_array[0];
var b = x ^ a; // uint32 can be represented as int without loss

var c = uint32_array[1];
var d = c + b; // addition that cannot overflow 53 bits of precision
               // followed by a truncation to uint32 is also fine
uint32_array[2] = d; // storing int32 into uint32 is also a "bitwise" truncating use

currently sources of uint32 are limited to x >>> 0 and Uint32Array so it should not be difficult.

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

Reply via email to