Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upexperiment with "inverting" liveness to improve perf of html5ever #52460
Comments
nikomatsakis
added
WG-compiler-nll
NLL-performant
labels
Jul 17, 2018
nikomatsakis
added this to the Rust 2018 Preview 2 milestone
Jul 17, 2018
nikomatsakis
added
I-nominated
A-NLL
labels
Jul 17, 2018
nikomatsakis
modified the milestones:
Rust 2018 Preview 2,
Rust 2018 Release Candidate
Jul 17, 2018
This comment has been minimized.
This comment has been minimized.
|
Decided to push this back to Release Candidate milestone:
|
lqd
referenced this issue
Jul 25, 2018
Closed
html5ever in the rustc-perf repository is memory-intensive #52028
nikomatsakis
referenced this issue
Aug 13, 2018
Merged
NLL: experiment with inverting liveness #53314
bors
added a commit
that referenced
this issue
Aug 13, 2018
bors
added a commit
that referenced
this issue
Aug 21, 2018
bors
added a commit
that referenced
this issue
Aug 22, 2018
bors
added a commit
that referenced
this issue
Aug 27, 2018
nikomatsakis
removed
the
WG-compiler-nll
label
Aug 27, 2018
nikomatsakis
self-assigned this
Aug 27, 2018
nikomatsakis
removed
the
I-nominated
label
Aug 27, 2018
bors
added a commit
that referenced
this issue
Aug 28, 2018
bors
added a commit
that referenced
this issue
Aug 28, 2018
bors
closed this
in
#53314
Aug 28, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
nikomatsakis commentedJul 17, 2018
html5ever profiles are dominated by code that "applies" the result of computing liveness. In thinking over how this code works, it seems like it might be better to "invert". Currently what happens is this:
util/livenesscode computes, for each point in the CFG, the set of live variables at each pointYou can see here the mismatch: in the first case, we store a bitset of variables per point, and in the later, a bitset of points per region. This results in a lot of "conversion" instructions.
I was thinking that it might be more efficient to do the liveness in an inverted sense. Instead of re-using the
util/livenesscode, we would do the following:This isn't fundamentally different but it has a few potential advantages:
One complication I remember now is that for drop-live we also do need the results of initialization at each point. That could be a bit of a pain to reconcile, have to think about it.
All in all, not an easy change, but maybe a good one.