-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Implement faster Rope equality #3955
Conversation
This optimizes for more reference equality checks. The old code allowed for this to happen for `Local(Bytes)` checks, but it didn't implement reference checks for `Shared(InnerRope)` shared data. Instead, it'd iterate every `RopeElem` inside the shared rope and perform quality on those.
The latest updates on your projects. Learn more about Vercel for Git ↗︎
8 Ignored Deployments
|
🟢 CI successful 🟢Thanks |
Benchmark for dcd962c
Click to view full benchmark
|
Benchmark for 53ad6e0
Click to view full benchmark
|
Benchmark for ee27be7
Click to view full benchmark
|
Ping @alexkirsz for review, since you were unlucky enough to emoji the benchmarks 😉 |
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.
@@ -22,10 +22,10 @@ static EMPTY_BUF: &[u8] = &[]; | |||
|
|||
/// A Rope provides an efficient structure for sharing bytes/strings between | |||
/// multiple sources. Cloning a Rope is extremely cheap (Arc and usize), and | |||
/// the sharing contents of one Rope can be shared by just cloning an Arc. | |||
/// the sharing contents of one Rope can be done by just cloning an Arc. |
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.
/// the sharing contents of one Rope can be done by just cloning an Arc. | |
/// sharing the contents of one Rope can be done by just cloning an Arc. |
} | ||
|
||
// At this point, we need to do slower contents equality. It's possible we'll | ||
// still get some memory reference quality for Bytes. |
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.
// still get some memory reference quality for Bytes. | |
// still get some memory reference equality for Bytes. |
# New Features * vercel/turborepo#4011 # Performance Improvements * vercel/turborepo#3955 * vercel/turborepo#4018 # Bug Fixes * vercel/turborepo#4037 * vercel/turborepo#4028 # Other * vercel/turborepo#3974 * vercel/turborepo#4015 * vercel/turborepo#3999 * vercel/turborepo#4026 * vercel/turborepo#4053 * vercel/turborepo#3891 Co-authored-by: JJ Kasper <[email protected]>
This optimizes for more reference equality checks. The old code allowed for this to happen for `Local(Bytes)` checks, but it didn't implement reference checks for `Shared(InnerRope)` shared data. Instead, it'd iterate every `RopeElem` inside the shared rope and perform equality on those.
This optimizes for more reference equality checks. The old code allowed for this to happen for `Local(Bytes)` checks, but it didn't implement reference checks for `Shared(InnerRope)` shared data. Instead, it'd iterate every `RopeElem` inside the shared rope and perform equality on those.
This optimizes for more reference equality checks. The old code allowed for this to happen for `Local(Bytes)` checks, but it didn't implement reference checks for `Shared(InnerRope)` shared data. Instead, it'd iterate every `RopeElem` inside the shared rope and perform equality on those.
This optimizes for more reference equality checks. The old code allowed for this to happen for
Local(Bytes)
checks, but it didn't implement reference checks forShared(InnerRope)
shared data. Instead, it'd iterate everyRopeElem
inside the shared rope and perform equality on those.