-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
Currently, the heapless_bytes::Bytes functions mostly delegate to heapless::Vec. This means that we need to append new items one by one when extending although we could use more efficient operations for byte slices. Alternatives would be to re-implement these operations through Vec::as_mut_ptr and Vec::set_len, or to not use heapless::Vec at all and implement Bytes from scratch.
Affected operations:
extend_from_slice: callspush_uncheckedfor every elementresize/resize_zero/resize_to_capacity: callspushfor every new element
If we would drop heapless::Vec, we could benefit from the (still unstable) MaybeUninit::copy_from_slice and MaybeUninit::fill.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels