-
Notifications
You must be signed in to change notification settings - Fork 188
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
poc: remove Rc Cell from parser2 parse scope structs #874
base: fe-v2
Are you sure you want to change the base?
Conversation
Nice! This is Interesting. # in rust-analyzer/crates/syntax
RUN_SLOW_BENCHES=1 cargo test --release -- --nocapture --test-threads=1 Also, I tried running the benchmark on 9,000 lines file made by repeating So, it depends on the later passes, but I guess it should be fine for now. |
I agree, but if we remove the Rc Cell, it could take about 17ms! ;) |
I've been wasting my time profiling the new parser. I noticed that it does a decent amount of allocating, and figured there may be easy speed wins. I'm fully aware that no one cares about this and I have better things to do with my life.
Here's an ugly poc of a minor improvement from a simple change; putting it here so that it doesn't fade away in my pile of git stashes.
Parsing a slightly modified uniswap contract:
739.23 µs
->647.37 µs
(This pr is based on #860)