Closed
Bug 1508521
Opened 7 years ago
Closed 7 years ago
Increment/decrement operations
Categories
(Core :: JavaScript Engine, defect, P3)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
mozilla66
| Tracking | Status | |
|---|---|---|
| firefox66 | --- | fixed |
People
(Reporter: terpri, Assigned: terpri)
References
Details
Attachments
(1 file)
Introduce increment and decrement JS ops for use by the corresponding operators. Currently the increment and decrement operators are expanded by the frontend to a sequence of arithmetic instructions, complicating BigInt support. This patch defines new opcodes for increment and decrement, treating them as new unary arithmetic operators.
| Assignee | ||
Comment 1•7 years ago
|
||
Comment 2•7 years ago
|
||
Good to see this work progressing. Very excited to be able to have some real integers in JS :)
Dropped in to triage this bug and give a heads up:
I previously tried to optimize the local-variable '++' operator (which desugared to GETLOCAL, POS, DUP, ONE, ADD, SETLOCAL, POP) into a single INCRLOCAL op.
After all was said and done, I noticed that there was some slight but notable regressions in the Speedometer benchmark. When I investigated, I found that IonMonkey's codegen's type-specialization behaviour depended on ICs associated with specific internal opcodes (e.g. information gleaned from the IC for POS, and the IC for ADD). There were other places where pattern matching against specific ops in that sequence was being used.
I fixed all of those and the perf regression got better, but there was still some residual, slight perf regression.
Just want to give a heads up on this bug to keep an eye out for these perf issues later on. If it's small enough it still makes sense to land (as hot-loop performance is less important to web code than good handling of objects and nominal polymorphism).
Priority: -- → P3
Comment 3•7 years ago
|
||
Hi! I picked up this patch from Robin and banged it into shape, with an IC for the INC and DEC opcodes. Perf results here:
Nothing stuck out for me but I am not a treeherder expert.
| Assignee | ||
Updated•7 years ago
|
Keywords: checkin-needed
Comment 4•7 years ago
|
||
Hi! Can you please get the review for the current diff?
Keywords: checkin-needed
| Assignee | ||
Updated•7 years ago
|
Keywords: checkin-needed
Pushed by ccoroiu@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/560290f26351
Introduce new increment and decrement operations. r=jandem
Keywords: checkin-needed
Comment 6•7 years ago
|
||
| bugherder | ||
Status: NEW → RESOLVED
Closed: 7 years ago
status-firefox66:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla66
Comment 7•7 years ago
|
||
This generated a performance regresiion see bug 1521080
You need to log in
before you can comment on or make changes to this bug.
Description
•