Use new simd library for scanning string literals

This commit is contained in:
2025-06-04 13:49:19 -04:00
parent b5f41768a7
commit 3e2f830d0b
4 changed files with 112165 additions and 82 deletions

View File

@@ -2,6 +2,7 @@
#include <cctype>
#include <cstdio>
#include <cstring>
#include <fstream>
#include <limits>
#include <string>
@@ -119,32 +120,11 @@
namespace {
const std::string json = R"({
"a number": 12345,
"true": true,
"false": false,
"null": null,
"glossary": {
"title": "example glossary",
"GlossDiv": {
"title": "S",
"GlossList": {
"GlossEntry": {
"ID": "SGML",
"SortAs": "SGML",
"GlossTerm": "Standard Generalized Markup Language",
"Acronym": "SGML",
"Abbrev": "ISO 8879:1986",
"GlossDef": {
"para": "A meta-markup language, used to create markup languages such as DocBook.",
"GlossSeeAlso": ["GML", "XML"]
},
"GlossSee": "markup"
}
}
}
}
})";
const std::string json = []() {
std::ifstream infile{"test.json"};
return std::string{std::istreambuf_iterator<char>(infile),
std::istreambuf_iterator<char>()};
}();
void testStreaming(std::string const &json) {
SerializeState streaming;