Skip to content

SpecForElem for i16/u16 and other digits #73995

Open
@pickfire

Description

@pickfire

We have specialization for SpecForElem for i8 and u8 (which provides a small performance win over plain extend for vec) but we could look into using specialization for that involves duplicating more digits with rep stosw (or d or q). It may need benchmarking to ensure that it's actually faster as mentioned by @joshtriplett

I am not sure how to reproduce the assembly rep stosw, someone that know could take up this issue.

Previous discussion: https://rust-lang.zulipchat.com/#narrow/stream/219381-t-libs/topic/SpecForElem.20for.20other.20integers

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-collectionsArea: `std::collections`A-specializationArea: Trait impl specializationC-enhancementCategory: An issue proposing an enhancement or a PR with one.I-slowIssue: Problems and improvements with respect to performance of generated code.T-libsRelevant to the library team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions