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.
Avoid more hygiene lookups #61484
Avoid more hygiene lookups #61484
Conversation
|
@bors try |
Avoid more hygiene lookups r? @ghost
This comment has been hidden.
This comment has been hidden.
|
|
|
@rust-timer build 9840af4 |
|
Success: Queued 9840af4 with parent c57ed9d, comparison URL. |
|
Finished benchmarking try commit 9840af4, comparison URL. |
Because it's not finished. I filed the PR because I wanted to do a perf run on CI. That's why I did |
485f834
to
af026f6
|
I fixed up the commit messages and edited the PR description above. |
af026f6
to
1d50c5f
|
At this point (after introduction of all these combined methods) perhaps it makes sense to introduce |
|
If
|
|
Ok, there are 4 "obviously combined" operations right now - r=me with nits addressed |
Also use `HygieneData::expn_info` in an appropriate place.
Also remove `HygieneData::apply_mark_internal`, which is no longer needed.
This combines two `HygieneData::with` calls into one.
They can each now do a single `HygieneData::with` call by replacing the `SyntaxContext` and `Mark` methods with the equivalent methods from `HygieneData`.
This combines two `HygieneData::with` calls into one on a hot path.
This combines multiple `HygieneData::with` calls into one, by combining parts of `hygienic_eq` and `adjust_ident`.
This combines multiple `HygieneData::with` calls on a hot path.
The commit combines two calls into one by saving the result in a local variable. The commit also moves the check for `async` later, so that when a different keyword is present the `rust_2018` call will be avoided completely.
Exposing |
These combine two `HygieneData::with` calls into one.
1d50c5f
to
4c9ecbf
|
I addressed the comments. @bors r=petrochenkov |
|
|
…ochenkov Avoid more hygiene lookups Mostly by combining multiple `HygieneData::with` calls into a single call on hot paths. r? @petrochenkov
|
|
Mostly by combining multiple
HygieneData::withcalls into a single call on hot paths.r? @petrochenkov