Converting a double JSValue to an int32 (or uint32) is fairly expensive since it includes the overhead of calling to(U)Int32SlowCase. We could move the ideal case (static_cast<(u)int32_t> of double value within range) out of the slow case for a performance boost on conversion-heavy pages such as http://www.bel.fi/~alankila/plasma.html
Created attachment 64453 [details] Proposed patch
Comment on attachment 64453 [details] Proposed patch For changes that are likely to affect performance, we usually require a performance measurement. Please at least post SunSpider results with and without this patch, though I'd also be interested to see measurements of the website you mentioned.
(In reply to comment #2) > (From update of attachment 64453 [details]) > Please at least post SunSpider results with and without this patch, though I'd also be interested to see measurements of the website you mentioned. Callgrind says: SunSpider is an amazing 0.0000072283% faster with this change. Results for the linked page are pretty much uninteresting until something is done about bug 43742.
Comment on attachment 64453 [details] Proposed patch With the fix for 43742 landed, this patch yields a 1.6% speedup for the plasma demo - http://www.bel.fi/~alankila/plasma.html
Comment on attachment 64453 [details] Proposed patch r=me
Comment on attachment 64453 [details] Proposed patch Clearing flags on attachment: 64453 Committed r65698: <http://trac.webkit.org/changeset/65698>
All reviewed patches have been landed. Closing bug.