Bug 155240 - [JSC] Consider converting ArithSub(..., 0) => ToNumber(...)
Summary: [JSC] Consider converting ArithSub(..., 0) => ToNumber(...)
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on: 154022
Blocks:
  Show dependency treegraph
 
Reported: 2016-03-09 10:28 PST by Yusuke Suzuki
Modified: 2016-03-09 10:28 PST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Yusuke Suzuki 2016-03-09 10:28:09 PST
value - 0 is an idiom to apply ToNumber in JS. (+ 0 is not typically used because "string" + 0 => "string0").
I've run octane and found box2d performs this several times.
(The code `... - 0` can be seen in kraken's fft, dft, etc. But this path is not used in the benchmark run).

Of course, before doing this, we should investigate the impact more...