From 2299904557f2bb52b6b587ff354265958fb4660e Mon Sep 17 00:00:00 2001 From: Andrew Noyes Date: Mon, 23 Jun 2025 14:29:49 -0400 Subject: [PATCH] Compare dfa and simdjson::validate_utf8 --- src/test.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/test.cpp b/src/test.cpp index 9fb36cc..ee8f1d7 100644 --- a/src/test.cpp +++ b/src/test.cpp @@ -353,6 +353,10 @@ TEST_CASE("utf8 dfa") { bench.doNotOptimizeAway( dfa.scan(match.data(), match.data() + match.size())); }); + bench.run("simdjson utf8", [&]() { + bench.doNotOptimizeAway( + simdjson::validate_utf8(match.data(), match.size())); + }); } // Different input structures with special care in the implementation