-
Notifications
You must be signed in to change notification settings - Fork 14.1k
Two small token-related improvements #145702
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
Conversation
This method always returns one or two token trees. This commit changes the return type to `(TokenTree, Option<TokenTree>)` to accurately capture this fact. The new code is also a little faster.
This file uses multiple `TokenStream` and `TokenTree` types. Confusingly, the non-qualified `TokenStream` is the one from `rustc_ast`, while the non-qualified `TokenTree` is the one from `rustc_proc_macro`. This commit removes some `use` items so that more types are qualified. It's a little more verbose but much clearer.
|
@bors2 try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Two small token-related improvements
This comment has been minimized.
This comment has been minimized.
|
Finished benchmarking commit (acb0dd8): comparison URL. Overall result: ❌ regressions - no action neededBenchmarking this pull request means it may be perf-sensitive – we'll automatically label it not fit for rolling up. You can override this, but we strongly advise not to, due to possible changes in compiler perf. @bors rollup=never Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)Results (primary 5.3%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (secondary -4.0%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 471.807s -> 470.705s (-0.23%) |
|
Weird. This was a clear icount win when I measured it locally. PGO, maybe? |
r? @ghost