Skip to content

Commit

Permalink
Fixing perf
Browse files Browse the repository at this point in the history
  • Loading branch information
DeepakRajendrakumaran committed Mar 27, 2024
1 parent 9994a5d commit 39da22a
Showing 1 changed file with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2200,11 +2200,7 @@ internal static unsafe nuint WidenAsciiToUtf16(byte* pAsciiBuffer, char* pUtf16B
private static unsafe bool HasMatch<TVectorByte>(TVectorByte vector)
where TVectorByte : unmanaged, ISimdVector<TVectorByte, byte>
{
if (AdvSimd.IsSupported && typeof(TVectorByte) == typeof(Vector128<byte>))
{
return VectorContainsNonAsciiChar((Vector128<byte>)(object)vector);
}
return ((vector & TVectorByte.Create((byte)0b1000_0000)) != TVectorByte.Zero);
return !(vector & TVectorByte.Create((byte)0x80)).Equals(TVectorByte.Zero);
}


Expand Down

0 comments on commit 39da22a

Please sign in to comment.