You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Most operations we do are actually incrementing counters. This should be as fast as possible, which is Arc<AtomicUsize>.
Other operations can be slower as they happen much more rarely.
In order to achieve this, DashMap should be replaced with a shared mutable tree implementation for prodash::tree, which is Send + Clone (but doesn't have to be sync). If the new implementation happens to be sync, which it could be, we can consider making this a property of prodash, which previously was a bit inconvenient as it forced users sometimes to wrap tree items into a mutex themselves.
Doing this naturally affects a lot of code especially in the renderers and it would be wise to figure out which steps to take to make this more gradual.
Benchmark Results
When using an Arc<AtomicUsize> compared to the current dashmap based implementation.
time: [34.193 ns 34.199 ns 34.206 ns]
thrpt: [146.17 Melem/s 146.20 Melem/s 146.23 Melem/s]
change:
time: [-90.711% -90.674% -90.626%] (p = 0.00 < 0.05)
thrpt: [+966.81% +972.27% +976.50%]
Performance has improved.
Found 13 outliers among 100 measurements (13.00%)
2 (2.00%) low severe
3 (3.00%) high mild
8 (8.00%) high severe
The text was updated successfully, but these errors were encountered:
Most operations we do are actually incrementing counters. This should be as fast as possible, which is
Arc<AtomicUsize>
.Other operations can be slower as they happen much more rarely.
In order to achieve this, DashMap should be replaced with a shared mutable tree implementation for
prodash::tree
, which isSend + Clone
(but doesn't have to be sync). If the new implementation happens to be sync, which it could be, we can consider making this a property ofprodash
, which previously was a bit inconvenient as it forced users sometimes to wrap tree items into a mutex themselves.Doing this naturally affects a lot of code especially in the renderers and it would be wise to figure out which steps to take to make this more gradual.
Benchmark Results
When using an
Arc<AtomicUsize>
compared to the current dashmap based implementation.The text was updated successfully, but these errors were encountered: