Skip to content

Optimize MemoryExtensions SequenceEqual for T = char #25207

@ahsonkhan

Description

@ahsonkhan

One option could be to convert to Span<byte> using AsBytes for any T = blittable type and call the existing vectorized method:
https://github.com/dotnet/corefx/blob/master/src/System.Memory/src/System/SpanHelpers.byte.cs#L889

Alternatively, create a char specific implementation and add a type check.

cc @KrzysztofCwalina, @GrabYourPitchforks, @stephentoub, @jkotas, @benaadams

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions