File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,6 @@ We recommend you install .NET 8: https://dotnet.microsoft.com/en-us/download/dot
2323## Running tests
2424
2525```
26- cd test
2726dotnet test
2827```
2928
Original file line number Diff line number Diff line change @@ -566,7 +566,10 @@ public static class UTF8
566566 Vector128 < byte > must23 = AdvSimd . Or ( isThirdByte , isFourthByte ) ;
567567 Vector128 < byte > must23As80 = AdvSimd . And ( must23 , v80 ) ;
568568 Vector128 < byte > error = AdvSimd . Xor ( must23As80 , sc ) ;
569- if ( AdvSimd . Arm64 . MaxAcross ( error ) . ToScalar ( ) != 0 )
569+ // AdvSimd.Arm64.MaxAcross(error) works, but it might be slower
570+ // than AdvSimd.Arm64.MaxAcross(Vector128.AsUInt32(error)) on some
571+ // hardware:
572+ if ( AdvSimd . Arm64 . MaxAcross ( Vector128 . AsUInt32 ( error ) ) . ToScalar ( ) != 0 )
570573 {
571574 return SimdUnicode . UTF8 . RewindAndValidateWithErrors ( processedLength , pInputBuffer + processedLength , inputLength - processedLength ) ;
572575 }
You can’t perform that action at this time.
0 commit comments