Conversation
|
I would be interested in migrating to parking lot, but before we do we should get some benchmark numbers against ripple's current implementation. Mostly interested in the code size delta. |
pahearn73
left a comment
There was a problem hiding this comment.
I would be interested in migrating to parking lot, but before we do we should get some benchmark numbers against ripple's current implementation. Mostly interested in the code size delta.
ea41a56 to
6876b96
Compare
6876b96 to
e2b3737
Compare
Migrate from std implementations of Mutex and RwLock to the parking_lot implementations. They are faster and more flexible than the those found in the Rust standard library.
17d82d7 to
550b177
Compare
|
@pahearn73 @brendanobra I rebased the commit on top of the current commit of the repo. Below is the results of the code size. Both where compiled with Without With As far as a comparison is considered, you will have todo that testing as I don't have access to a device. If you did a perf run I would look for a decrease in time for |
What
Migrate from std implementations of Mutex and RwLock to the parking_lot implementations. They are faster and more flexible than the those found in the Rust standard library. The
parking_lotimplementation also can not be poisoned, meaning that anyMutex/RwLockoperations do not return aResult<>making the call tounwrap()no longer needed.This change does make
parking_lotcrate a part of theripple_sdk. It is up to the Ripple team to determine if that is an acceptable change.Why
MutexandRwLockoperationsunwrap()s removed.unwrap()is called a conditional must be inserted with apanicfor theErrvariant.How
By swapping
std::sync::Mutexwithparking_lot::Mutexandstd::sync::RwLockwithparking_lot::RwLock.Test
TBD
Checklist