poc: remove Rc Cell from parser2 parse scope structs#874
Draft
sbillig wants to merge 69 commits intoargotorg:fe-v2from
Draft
poc: remove Rc Cell from parser2 parse scope structs#874sbillig wants to merge 69 commits intoargotorg:fe-v2from
sbillig wants to merge 69 commits intoargotorg:fe-v2from
Conversation
Member
|
Nice! This is Interesting. # in rust-analyzer/crates/syntax
RUN_SLOW_BENCHES=1 cargo test --release -- --nocapture --test-threads=1Also, 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. |
Collaborator
Author
|
I agree, but if we remove the Rc Cell, it could take about 17ms! ;) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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)