Closed
Bug 871634
Opened 12 years ago
Closed 12 years ago
ion: Rerun GVN after UCE
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
FIXED
mozilla24
People
(Reporter: nmatsakis, Assigned: nmatsakis)
Details
Attachments
(2 files)
|
3.15 KB,
patch
|
dvander
:
review+
|
Details | Diff | Splinter Review |
|
6.69 KB,
text/plain
|
Details |
We have found that UCE sometimes exposes better opportunities for GVN. In particular UCE can eliminate dead code paths that contribute undefineds and other stray values into the "typeset".
Comment 1•12 years ago
|
||
I'd recommend merging the two passes rather than re-running the GVN.
| Assignee | ||
Comment 2•12 years ago
|
||
Attachment #748924 -
Flags: review?(dvander)
| Assignee | ||
Comment 3•12 years ago
|
||
Merging GVN and UCE? I've thought about it. It seems like a reasonably good idea, if more complicated. Of course, in the general case iteration will always be required to fully optimize (that is, GVN can expose opportunities for UCE and vice versa).
Updated•12 years ago
|
Attachment #748924 -
Flags: review?(dvander) → review+
| Assignee | ||
Updated•12 years ago
|
Assignee: general → nmatsakis
| Assignee | ||
Comment 4•12 years ago
|
||
h4writer was asking what motivated this change.
Here is evidence of the importance of this optimization (or a similar one, such as merging GVN and UCE):
The parjs-benchmarks/nbody-seeded.js benchmark becomes *twice as fast* using this optimization. The reason is that there is code like:
foo = self.get(i)[0];
bar = self.get(i)[1];
zed = seld.get(i)[2];
Before GVN is applied, there are lots of seemingly important branches. After GVN, we have constant optimized many of those branch tests to false/true. UCE then runs and removes the dead code. When we then *re-run* GVN, we are able to extract out self.get(i) into common code, avoiding many loads and in some cases hoisting bounds checks as well.
| Assignee | ||
Comment 5•12 years ago
|
||
Here are some measurements from my local machine with an optimized, threadsafe, 32-bit shell build, running v8:
Before After %
Crypto 23800 23790
Deltablue 25052 24616 -1.7%
EarleyBoyer 25873 25843
NavierStokes 27751 27899 +0.5%
RayTrace 35854 35304 -1.5%
RegExp 3744 3785 +1.1%
Richards 24157 23984 -0.7%
Splay 19662 20259 +3.0%
| Assignee | ||
Comment 6•12 years ago
|
||
| Assignee | ||
Comment 7•12 years ago
|
||
| Assignee | ||
Comment 8•12 years ago
|
||
Comment 9•12 years ago
|
||
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla24
You need to log in
before you can comment on or make changes to this bug.
Description
•