Uh oh!
There was an error while loading. Please reload this page.
Special-case literals in parse_bottom_expr. - #61612
Conversation
nnethercote
commented
Jun 7, 2019
@bors try |
bors
commented
Jun 7, 2019
Special-case literals in `parse_bottom_expr`. This makes parsing faster, particularly for code with large constants, for two reasons: - it skips all the keyword comparisons for literals; - it skips the allocation done by the `mk_expr` call in `parse_literal_maybe_minus`. r? @petrochenkov
bors
commented
Jun 7, 2019
☔ The latest upstream changes (presumably #61541) made this pull request unmergeable. Please resolve the merge conflicts. |
bors
commented
Jun 7, 2019
☀️ Try build successful - checks-travis |
a4952ba to
c1947b1Comparennethercote
commented
Jun 8, 2019
Rebased. @bors try |
bors
commented
Jun 8, 2019
⌛ Trying commit c1947b171c7cedb269b5022f16cd3c92592aceb5 with merge ad061396c7509b3356c9bb5cfa0a8b3f54d9924e... |
nnethercote
commented
Jun 8, 2019
@bors rollup=never, because this affects performance. |
bors
commented
Jun 8, 2019
☀️ Try build successful - checks-travis |
nnethercote
commented
Jun 8, 2019
@rust-timer build ad061396c7509b3356c9bb5cfa0a8b3f54d9924e |
rust-timer
commented
Jun 8, 2019
Success: Queued ad061396c7509b3356c9bb5cfa0a8b3f54d9924e with parent d132f54, comparison URL. |
rust-timer
commented
Jun 8, 2019
Finished benchmarking try commit ad061396c7509b3356c9bb5cfa0a8b3f54d9924e, comparison URL. |
petrochenkov
commented
Jun 8, 2019
Nice, I didn't expect an effect like this from parser changes. Could you move the common code from the added snippet and from its original code below into a closure/function/macro? |
nnethercote
commented
Jun 8, 2019
You mean the |
petrochenkov
commented
Jun 8, 2019
@nnethercote |
This makes parsing faster, particularly for code with large constants, for two reasons: - it skips all the keyword comparisons for literals; - it replaces the unnecessary `parse_literal_maybe_minus` call with `parse_lit`, avoiding an unnecessary allocation via `mk_expr`.
c1947b1 to
35b5f43Comparepetrochenkov
commented
Jun 10, 2019
@bors r+ rollup |
bors
commented
Jun 10, 2019
📌 Commit 35b5f43 has been approved by |
nnethercote
commented
Jun 10, 2019
@bors rollup=never, because this affects performance. |
nnethercote
commented
Jun 10, 2019
Trying again... @bors rollup=never |
nnethercote
commented
Jun 10, 2019
Ok, that worked. Looks like the reason for the rollup-never must not be on the same line. |
…pr, r=petrochenkov Special-case literals in `parse_bottom_expr`. This makes parsing faster, particularly for code with large constants, for two reasons: - it skips all the keyword comparisons for literals; - it skips the allocation done by the `mk_expr` call in `parse_literal_maybe_minus`. r? @petrochenkov
…chenkov Special-case literals in `parse_bottom_expr`. This makes parsing faster, particularly for code with large constants, for two reasons: - it skips all the keyword comparisons for literals; - it skips the allocation done by the `mk_expr` call in `parse_literal_maybe_minus`. r? @petrochenkov
bors
commented
Jun 12, 2019
bors
commented
Jun 12, 2019
☀️ Test successful - checks-travis, status-appveyor |
rust-highfive
commented
Jun 12, 2019
Tested on commit rust-lang/rust@55cee44. Direct link to PR: <rust-lang/rust#61612> 🎉 rls on linux: test-fail → test-pass (cc @Xanewok, @rust-lang/infra).
This makes parsing faster, particularly for code with large constants,
for two reasons:
mk_exprcall inparse_literal_maybe_minus.r? @petrochenkov