@@ -195,16 +195,33 @@ public static unsafe class Utf8Utility
195
195
// return invalidBytePointer;
196
196
// }
197
197
// }
198
+
199
+ // | Method | FileName | Mean | Error | StdDev | Allocated |
200
+ // |---------------------------- |----------------------- |-----------:|----------:|----------:|----------:|
201
+ // | SIMDUtf8ValidationRealData | data/arabic.utf8.txt | 454.633 us | 4.3116 us | 3.8221 us | - |
202
+ // | SIMDUtf8ValidationErrorData | data/arabic.utf8.txt | 270.426 us | 4.4255 us | 4.5447 us | - |
203
+ // | SIMDUtf8ValidationRealData | data/chinese.utf8.txt | 129.489 us | 2.3981 us | 2.3553 us | - |
204
+ // | SIMDUtf8ValidationErrorData | data/chinese.utf8.txt | 16.391 us | 0.3104 us | 0.2752 us | - |
205
+ // | SIMDUtf8ValidationRealData | data/english.utf8.txt | 11.192 us | 0.0790 us | 0.0660 us | - |
206
+ // | SIMDUtf8ValidationErrorData | data/english.utf8.txt | 11.244 us | 0.1760 us | 0.1646 us | - |
207
+ // | SIMDUtf8ValidationRealData | data/french.utf8.txt | 12.826 us | 0.0646 us | 0.0573 us | - |
208
+ // | SIMDUtf8ValidationErrorData | data/french.utf8.txt | 13.416 us | 0.2554 us | 0.4921 us | - |
209
+ // | SIMDUtf8ValidationRealData | data/german.utf8.txt | 6.006 us | 0.1154 us | 0.1617 us | - |
210
+ // | SIMDUtf8ValidationErrorData | data/german.utf8.txt | 5.925 us | 0.0930 us | 0.0870 us | - |
211
+ // | SIMDUtf8ValidationRealData | data/japanese.utf8.txt | 138.051 us | 1.2770 us | 1.1945 us | - |
212
+ // | SIMDUtf8ValidationErrorData | data/japanese.utf8.txt | 75.751 us | 0.9603 us | 0.7498 us | - |
213
+ // | SIMDUtf8ValidationRealData | data/turkish.utf8.txt | 173.199 us | 3.4289 us | 5.4386 us | - |
214
+ // | SIMDUtf8ValidationErrorData | data/turkish.utf8.txt | 112.989 us | 1.7684 us | 1.5677 us | - |
198
215
if ( processedLength < inputLength )
199
216
{
200
217
201
- Span < byte > remainingBytes = stackalloc byte [ 32 ] ;
218
+ Span < byte > remainingBytes = stackalloc byte [ 64 ] ;
202
219
new Span < byte > ( pInputBuffer + processedLength , inputLength - processedLength ) . CopyTo ( remainingBytes ) ;
203
220
204
221
ReadOnlySpan < Byte > remainingBytesReadOnly = remainingBytes ;
205
222
Vector256 < byte > remainingBlock = Vector256 . Create ( remainingBytesReadOnly ) ;
206
223
Utf8Validation . utf8_checker . CheckNextInput ( remainingBlock ) ;
207
-
224
+
208
225
Utf8Validation . utf8_checker . CheckEof ( ) ;
209
226
if ( Utf8Validation . utf8_checker . Errors ( ) )
210
227
{
0 commit comments