Bug 155240
| Summary: | [JSC] Consider converting ArithSub(..., 0) => ToNumber(...) | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Yusuke Suzuki <ysuzuki> |
| Component: | JavaScriptCore | Assignee: | Nobody <webkit-unassigned> |
| Status: | NEW | ||
| Severity: | Normal | ||
| Priority: | P2 | ||
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Bug Depends on: | 154022 | ||
| Bug Blocks: | |||
Yusuke Suzuki
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...
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |