Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Rewrite `precompute_borrows_out_of_scope` for fewer hash table lookups. #53942
Conversation
It now does one hash table lookup per basic block, instead of one per statement. This is worthwhile because this function is hot for NLL builds of `ucd`.
|
@bors try |
Rewrite `precompute_borrows_out_of_scope` for fewer hash table lookups. It now does one hash table lookup per basic block, instead of one per statement. This is worthwhile because this function is hot for NLL builds of `ucd`. I haven't measured the effect of this yet because I'm having trouble doing optimized builds of rustc that are suitable for profiling (#53916). I will do an online perf run instead. r? @nikomatsakis
|
|
|
@rust-timer build e658883 |
|
Success: Queued e658883 with parent 8b80390, comparison URL. |
|
BTW, I verified the correctness of this by implementing the new code alongside the old code, running both in tandem, and asserting that the |
|
Perf results are in; ucd-check improves by almost 60%. |
|
This is nice. |
|
@bors r+ |
|
|
Yay! And it's a 1% NLL win for @nikomatsakis: I have one question. Each BB has |
This is correct, the terminator location is no different from the others from the POV of this code. |
|
I bet $5 that #53909 will end up landing before this does, in which case this PR will provide (a) a 1% |
well that is an interesting technique to try to get your PR some favoritism from the reviewers! |
|
48 hours ago this PR was 10th in Homu's queue. It's now 11th. I find Homu frustrating: #37107 |
…komatsakis Rewrite `precompute_borrows_out_of_scope` for fewer hash table lookups. It now does one hash table lookup per basic block, instead of one per statement. This is worthwhile because this function is hot for NLL builds of `ucd`. I haven't measured the effect of this yet because I'm having trouble doing optimized builds of rustc that are suitable for profiling (rust-lang#53916). I will do an online perf run instead. r? @nikomatsakis
Rollup of 11 pull requests Successful merges: - #51366 (stabilize #[panic_handler]) - #53162 (rustdoc: collect trait impls as an early pass) - #53932 ([NLL] Remove base_place) - #53942 (Rewrite `precompute_borrows_out_of_scope` for fewer hash table lookups.) - #53973 (Have rust-lldb look for the rust-enabled lldb) - #53981 (Implement initializer() for FileDesc) - #53987 (rustbuild: allow configuring llvm version suffix) - #53993 (rustc_resolve: don't record uniform_paths canaries as reexports.) - #54007 (crates that provide a `panic_handler` are exempt from the `unused_extern_crates` lint) - #54040 (update books for next release) - #54050 (Update `petgraph` dependency to 0.4.13 to fix build with nightly) Failed merges: r? @ghost
…komatsakis Rewrite `precompute_borrows_out_of_scope` for fewer hash table lookups. It now does one hash table lookup per basic block, instead of one per statement. This is worthwhile because this function is hot for NLL builds of `ucd`. I haven't measured the effect of this yet because I'm having trouble doing optimized builds of rustc that are suitable for profiling (rust-lang#53916). I will do an online perf run instead. r? @nikomatsakis
Rollup of 10 pull requests Successful merges: - #53315 (use `NonZeroU32` in `newtype_index!`macro, change syntax) - #53932 ([NLL] Remove base_place) - #53942 (Rewrite `precompute_borrows_out_of_scope` for fewer hash table lookups.) - #53973 (Have rust-lldb look for the rust-enabled lldb) - #53981 (Implement initializer() for FileDesc) - #53987 (rustbuild: allow configuring llvm version suffix) - #53993 (rustc_resolve: don't record uniform_paths canaries as reexports.) - #54007 (crates that provide a `panic_handler` are exempt from the `unused_extern_crates` lint) - #54040 (update books for next release) - #54050 (Update `petgraph` dependency to 0.4.13 to fix build with nightly)
It did, by about 4 hours. |
|
@nnethercote it looks more like yours merged 8h before #53909 (in my timezone of GMT+2: 4PM Sept 8, while 53909 did on Sept 9 at 20 minutes after midnight :) |
It now does one hash table lookup per basic block, instead of one per
statement. This is worthwhile because this function is hot for NLL
builds of
ucd.I haven't measured the effect of this yet because I'm having trouble doing optimized builds of rustc that are suitable for profiling (#53916). I will do an online perf run instead.
r? @nikomatsakis