Skip to content

Is the conversion from bytes to Vec<u8> O(1) #711

Open
@cBournhonesque

Description

@cBournhonesque

Is the conversion from bytes to Vec O(1) if the underlying memory is already contiguous and the ref count is 1?

Or do we still have new allocations and copying?

I looked at #547, it seems to suggest that it indeed is O(1) but the docs say

Copies self into a new Vec.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions