Skip to content
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

Recognize ident tokens instead of doing is_ident at runtime #135

Merged
merged 1 commit into from
Oct 14, 2019
Merged

Conversation

dtolnay
Copy link
Owner

@dtolnay dtolnay commented Oct 11, 2019

This is a rebase of #91.

before after Δ
cargo bench 125μs 119μs -5%
cargo build --benches && target/debug/bench-* --bench 2100μs 1860μs -11%

@nnethercote
Copy link
Contributor

I tried to benchmark this but couldn't get it to have any effect. I have a local copy of quote with this PR applied and a local copy of proc-macro2. And I changed the Cargo.toml of a couple of benchmarks (ones affected in the past by this stuff) like so:

+[patch.crates-io]
+quote = { path = '/home/njn/moz/quote' }
+proc-macro2 = { path = '/home/njn/moz/proc-macro2' }

But it made only tiny differences. I don't know if I did something wrong or if it just doesn't help.

The patch is so simple that you might as well just land it for the benchmark improvement anyway?

@dtolnay
Copy link
Owner Author

dtolnay commented Oct 14, 2019

Thanks! Yeah this came out a lot simpler than the original patch in #91 now that we no longer need to support rustc <1.20. I agree, might as well land it.

@dtolnay dtolnay merged commit 86f9985 into master Oct 14, 2019
@dtolnay dtolnay deleted the opt branch October 14, 2019 05:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants