Skip to content

Commit 92da59a

Browse files
Nick-Nuonlemire
andauthored
Avx512 Validation (#45)
* NoErrorIncompleteThenASCIIAvx512 without validate count passing * addition * all tests pass save BadHeaderBitsAvx512 and Validaecount * All tests wo validatecount passing * all tests working + benchmarks * cleanup * Update src/UTF8.cs --------- Co-authored-by: Daniel Lemire <daniel@lemire.me>
1 parent 2e85602 commit 92da59a

File tree

3 files changed

+411
-70
lines changed

3 files changed

+411
-70
lines changed

benchmark/Benchmark.cs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,22 @@ public unsafe void SIMDUtf8ValidationRealDataArm64()
238238

239239
}
240240

241+
[Benchmark]
242+
[BenchmarkCategory("avx512")]
243+
public unsafe void SIMDUtf8ValidationRealDataAvx512()
244+
{
245+
if (allLinesUtf8 != null)
246+
{
247+
RunUtf8ValidationBenchmark(allLinesUtf8, (byte* pInputBuffer, int inputLength) =>
248+
{
249+
int dummyUtf16CodeUnitCountAdjustment, dummyScalarCountAdjustment;
250+
// Call the method with additional out parameters within the lambda.
251+
// You must handle these additional out parameters inside the lambda, as they cannot be passed back through the delegate.
252+
return SimdUnicode.UTF8.GetPointerToFirstInvalidByteAvx512(pInputBuffer, inputLength, out dummyUtf16CodeUnitCountAdjustment, out dummyScalarCountAdjustment);
253+
});
254+
}
255+
}
256+
241257
[Benchmark]
242258
[BenchmarkCategory("avx")]
243259
public unsafe void SIMDUtf8ValidationRealDataAvx2()

0 commit comments

Comments
 (0)