Skip to content

Commit c03570b

Browse files
committed
clearer comments
1 parent fee8585 commit c03570b

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/UTF8_validation.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
using System.Reflection;
1010
using System.Runtime.InteropServices.JavaScript;
1111
using static SimdUnicode.Utf8Validation;
12+
using System.Threading.Channels;
1213

1314

1415
// C# already have something that is *more or less* equivalent to our C++ simd class:
@@ -625,6 +626,8 @@ public static unsafe class Utf8Utility
625626
}
626627
}
627628

629+
// benches done with 2 times unroll
630+
628631
// | Method | FileName | Mean | Error | StdDev | Allocated |
629632
// |---------------------------- |----------------------- |-----------:|----------:|----------:|----------:|
630633
// | SIMDUtf8ValidationRealData | data/arabic.utf8.txt | 454.633 us | 4.3116 us | 3.8221 us | - |
@@ -796,6 +799,10 @@ public static unsafe class Utf8Utility
796799
// call the SIMD function only if inputLength is sufficiently large (maybe 64 bytes),
797800
// otherwise, use the scalar function.
798801
////////////////
802+
///
803+
804+
805+
// unrolling benchmarks done with scalar tail
799806
// | Method | FileName | Mean | Error | StdDev | Allocated |
800807
// |---------------------------- |----------------------- |-----------:|----------:|----------:|----------:|
801808
// | SIMDUtf8ValidationRealData | data/arabic.utf8.txt | 428.127 us | 7.9313 us | 7.7896 us | - |

0 commit comments

Comments
 (0)