Status: New
Owner: ----

New issue 1248 by [email protected]: unary add support in Crankshaft
http://code.google.com/p/v8/issues/detail?id=1248

Not sure why unary add is not supported in current Crankshaft but this does prevent some JS applications from being fully optimized by Crankshaft. One example is JSNES (http://benfirshman.com/projects/jsnes/), where the hottest function "frame" has never been optimized as it contains such expression like "+new Date()". Attached is a simple patch to address this issue, and it has been verified that with this patch the "frame" function gets optimized by Crankshaft. Please check the below profiling results w/o and w/ the patch. It passed all the V8 tests.

w/o the patch -
   ticks  total  nonlib   name
25423 26.6% 32.0% LazyCompile: ~JSNES.frame http://benfirshman.com/js/jsnes-a51193129179cf301154.src.js:114

w/ the patch -
   ticks  total  nonlib   name
18281 21.9% 27.2% LazyCompile: *JSNES.frame http://benfirshman.com/js/jsnes-a51193129179cf301154.src.js:114

Attachments:
        unary-add.patch  754 bytes

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

Reply via email to