Skip to content

investigate reducing binary size caused by generics #197

@cyphar

Description

@cyphar

Due to the way generics are implemented in Rust (monomorphisation), every generic function ends up creating a copy for every impl of the trait that uses the function. The most common trick to get around this (especially for T: AsRef<A>) is to make the generic function a very simple wrapper that calls a implementation function that takes &A and thus produces only one function.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions