-
Notifications
You must be signed in to change notification settings - Fork 0
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
RootedRc is not much faster than Arc #2
Comments
Locally changing the
EDIT: deleted invalid |
Using the unstable non-lazily-initialized thread-locals in addition to using
EDIT: pushed these changes to performance-hacks branch for reference. Above measurement was @ 5f409ef |
I iterated on the benchmarks - it looks like Switching the hasher for hashset to a more efficient one helped quite a bit. Changing the design to not require a hashset at all helped a bit more. It's still only a little faster than
Current results on main, at 3a194ff:
|
Updated the benchmarks on the "performance-hacks" branch as well. That branch still has the advantage of using the (unstable) faster thread-locals. It helps a bit, but not that much: @ 659e813
|
Added a "cross-core clone" benchmark. This creates 1000 This seems to show slightly more benefit for On the "performance hacks" branch @ e74aabe:
EDIT: There's no cross-core Rc test because these tests use separate threads to create the objects in setup vs doing the actual work, and |
I added a I also found and fixed a problem in all of the clone benchmarks - the cloned value was getting dropped inside the benchmark timing. This didn't matter too much before
Or normalizing the median times by Rc::clone and sorting:
After implementing a "fast drop", this issue will probably be ready to be closed. |
Well that's unfortunate, since the whole point is to be faster than Arc.
Prime suspects are:
Option
instead of aHashSet
.Probable next step is to run
perf
to verify where the time is actually being spent.Here are the current numbers:
EDIT: deleted invalid
Rc
benchmark (operations under test were optimized away)The text was updated successfully, but these errors were encountered: