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
_ => {
let mut l = 0;
for s in slices.by_ref() {
l += s.len();
}
let mut vec = Vec::with_capacity(l);
for slice in slices {
vec.extend_from_slice(slice);
}
Cow::Owned(vec)
},
This will ensure a single allocation and will reduce to the minimum the total number of bytes actually copied.
The text was updated successfully, but these errors were encountered:
The implementation for the contiguous operation is sub-optimal for the case in which we have multiple slices.
This code:
zenoh/commons/zenoh-buffers/src/lib.rs
Line 105 in 7a47445
Should be rewritten to look something like:
This will ensure a single allocation and will reduce to the minimum the total number of bytes actually copied.
The text was updated successfully, but these errors were encountered: