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
Often collections are used in loops where multiple updates/operations are performed at once.
If there were a way to perform multiple updates at once these could be made more efficient.
The most obvious way to do this would be to optimize this:
and similar methods internally. Then for users taking advantage of the higher performance is just a matter of making better use of the existing traits.
In the above function, a new OrdMap is being constructed, and won't be seen by the caller until all the inserts are completed, yet every intermediate map is created and thrown out.
The text was updated successfully, but these errors were encountered:
let root = PoolRef::make_mut(&self.pool.0,&mutself.root);
This only clones when a value is shared. When however the reference count is 1, the same value can be reused and mutated in place. So there’s not much creating and throwing out as you seem to think.
Often collections are used in loops where multiple updates/operations are performed at once.
If there were a way to perform multiple updates at once these could be made more efficient.
The most obvious way to do this would be to optimize this:
im-rs/src/ord/map.rs
Lines 1997 to 2001 in 3f4e01a
and similar methods internally. Then for users taking advantage of the higher performance is just a matter of making better use of the existing traits.
In the above function, a new OrdMap is being constructed, and won't be seen by the caller until all the inserts are completed, yet every intermediate map is created and thrown out.
The text was updated successfully, but these errors were encountered: