Skip to content

Light up Utf8Utility.*.cs and Utf16Utility.*.cs with Vector512 code paths.  #86119

Open
@DeepakRajendrakumaran

Description

This task is to identify potential opportunities to use Vector512 in these libraries(ASCII/UTF) and add Vector512 paths where possible to further accelerate using SIMD.

@dotnet/avx512-contrib

See below for list of functions which have SIMD paths in them

  • GetPointerToFirstInvalidChar(utf16Utility.Validation.cs)
    Note from Ruihan - The existing implementation has Sse2 code path and Vector128 code path, a Sse2.AddSaturate differentiates these 2 code path. We worked internally to upgrade it with Vector256/Avx2, and Vector512/Avx512 code paths, the performance for Vector256 path was fine but the upgrade was blocked by the performance issue we found on Vector512 path due to the execution unit contention between AddSaturate(VPADDUSW) and ExtractMostSignificantBits(VPMOVB2M), which leads to no performance gain compared against Vector256.

  • GetPointerToFirstInvalidByte(Utf8Utility.Validation.cs)
    Up for grabs for community to work on

  • TranscodeToUtf8(Utf8Utility.Transcoding.cs)
    Up for grabs for community to work on

  • AllBytesInVector128AreAscii(Utf8Utility.cs) , Vector128OrdinalIgnoreCaseAscii(Utf8Utility.cs)-> EqualsIgnoreCaseUtf8_Vector128(Ordinal.Utf8.cs) -> EqualsIgnoreCaseUtf8(Ordinal.Utf8.cs)
    Up for grabs for community to work on

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions