Skip to content

Commit

Permalink
clearer comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Nick-Nuon committed Feb 15, 2024
1 parent fee8585 commit c03570b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/UTF8_validation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
using System.Reflection;
using System.Runtime.InteropServices.JavaScript;
using static SimdUnicode.Utf8Validation;
using System.Threading.Channels;


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

// benches done with 2 times unroll

// | Method | FileName | Mean | Error | StdDev | Allocated |
// |---------------------------- |----------------------- |-----------:|----------:|----------:|----------:|
// | SIMDUtf8ValidationRealData | data/arabic.utf8.txt | 454.633 us | 4.3116 us | 3.8221 us | - |
Expand Down Expand Up @@ -796,6 +799,10 @@ public static unsafe class Utf8Utility
// call the SIMD function only if inputLength is sufficiently large (maybe 64 bytes),
// otherwise, use the scalar function.
////////////////
///


// unrolling benchmarks done with scalar tail
// | Method | FileName | Mean | Error | StdDev | Allocated |
// |---------------------------- |----------------------- |-----------:|----------:|----------:|----------:|
// | SIMDUtf8ValidationRealData | data/arabic.utf8.txt | 428.127 us | 7.9313 us | 7.7896 us | - |
Expand Down

0 comments on commit c03570b

Please sign in to comment.