-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
Store source in an Arc<str> #483
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
merge conflicts 😬
I've resolved the conflicts and am preparing this PR to be pulled in, since I'd like it to be in before deploying. |
Is there a reason to choose |
4644dd1
to
25351e5
Compare
I've rebased this off of master. |
I figured it would be good to leave us with the option to. I don't know how big the performance hit is from using |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clippy CI is failing
The only experience I have is with C++ |
25351e5
to
f9785cf
Compare
f9785cf
to
fe63481
Compare
This is rebased (again) and CI fixed.
C++'s |
It's beside the point here, but |
Looking at the CI runs for this branch vs. master, I don't think there's a significant performance difference. Considering we are single threaded, there's essentially just an extra semaphore and a u64 counting references. I'm gonna go ahead and merge this in, if we want to bench against plain |
+1 on @sezna's comment to bench first, and if using |
This PR removes the
<'sc>
lifetime which was on just about every type and function in the codebase. Source code is now stored in anArc<str>
andSpan
is used to represent a sub-slice of the string.