Skip to content

ShaderDefVal can be optimized by using Cow<'static, str> #24036

@beicause

Description

@beicause

ShaderDefVal uses String:

pub enum ShaderDefVal {
    Bool(String, bool),
    Int(String, i32),
    UInt(String, u32),
}

But most ShaderDefVals are &'static str. Replace the String with Cow<'static, str> can reduce heap allocations.

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