Skip to content

vec::from_elem with primitives should be as fast as calloc #7136

Closed
@erickt

Description

@erickt

While @cmr landed a nice optimization of vec::from_elem in #6876, he said that it's still not performing as fast as doing a malloc and a ptr::set_memory. We should figure out why it is not performing as well as it should be and fix it in order to remove the temptation of using the faster unsafe functions.

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