-
Notifications
You must be signed in to change notification settings - Fork 12.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rustc_parse: Remove optimization for 0-length streams in collect_tokens
#78736
Conversation
b3a80c8
to
77b9d9d
Compare
@bors try @rust-timer queue |
Awaiting bors try build completion |
⌛ Trying commit 77b9d9d4916afed142696d5d02640c940b472cae with merge c0412539ea5cbf39d8ba7b0f55e19f5dcefc3c62... |
☀️ Try build successful - checks-actions |
Queued c0412539ea5cbf39d8ba7b0f55e19f5dcefc3c62 with parent 601c13c, future comparison URL. |
Finished benchmarking try commit (c0412539ea5cbf39d8ba7b0f55e19f5dcefc3c62): comparison url. Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. Please note that if the perf results are neutral, you should likely undo the rollup=never given below by specifying Importantly, though, if the results of this run are non-neutral do not roll this PR up -- it will mask other regressions or improvements in the roll up. @bors rollup=never |
This means that
Right now the construction of |
Marking as blocked on #78782, I'll re-collect the statistics after that PR lands. |
Do not collect tokens for doc comments Doc comment is a single token and AST has all the information to re-create it precisely. Doc comments are also responsible for majority of calls to `collect_tokens` (with `num_calls == 1` and `num_calls == 0`, cc rust-lang#78736). (I also moved token collection into `fn parse_attribute` to deduplicate code a bit.) r? `@Aaron1011`
Do not collect tokens for doc comments Doc comment is a single token and AST has all the information to re-create it precisely. Doc comments are also responsible for majority of calls to `collect_tokens` (with `num_calls == 1` and `num_calls == 0`, cc rust-lang/rust#78736). (I also moved token collection into `fn parse_attribute` to deduplicate code a bit.) r? `@Aaron1011`
☀️ Try build successful - checks-actions |
Queued 8b963349bc7968741e1cec1bfdc52e0f9629d35a with parent 9722952, future comparison URL. |
Finished benchmarking try commit (8b963349bc7968741e1cec1bfdc52e0f9629d35a): comparison url. Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. Please note that if the perf results are neutral, you should likely undo the rollup=never given below by specifying Importantly, though, if the results of this run are non-neutral do not roll this PR up -- it will mask other regressions or improvements in the roll up. @bors rollup=never |
@bors rollup- |
@bors r+ |
📌 Commit 2879ab7 has been approved by |
rustc_parse: Remove optimization for 0-length streams in `collect_tokens` The optimization conflates empty token streams with unknown token stream, which is at least suspicious, and doesn't affect performance because 0-length token streams are very rare. r? `@Aaron1011`
rustc_parse: Remove optimization for 0-length streams in `collect_tokens` The optimization conflates empty token streams with unknown token stream, which is at least suspicious, and doesn't affect performance because 0-length token streams are very rare. r? ``@Aaron1011``
⌛ Testing commit 2879ab7 with merge dadec646cd5075aed7357933089ba1d2ab0a1545... |
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
💔 Test failed - checks-actions |
spurious zlib inflation error @bors retry |
rustc_parse: Remove optimization for 0-length streams in `collect_tokens` The optimization conflates empty token streams with unknown token stream, which is at least suspicious, and doesn't affect performance because 0-length token streams are very rare. r? `@Aaron1011`
☀️ Test successful - checks-actions |
The optimization conflates empty token streams with unknown token stream, which is at least suspicious, and doesn't affect performance because 0-length token streams are very rare.
r? @Aaron1011