mirror of
https://github.com/simdjson/simdjson
synced 2026-06-08 17:27:07 +00:00
Adding version with string validation.
This commit is contained in:
@@ -82,12 +82,14 @@ int main(int argc, char *argv[]) {
|
||||
char * buffer = (char *) malloc(p.second);
|
||||
memcpy(buffer, p.first, p.second);
|
||||
buffer[p.second] = '\0';
|
||||
BEST_TIME(d.Parse<kParseValidateEncodingFlag>((const char *)buffer).HasParseError(), false,
|
||||
memcpy(buffer, p.first, p.second), repeat, volume, true);
|
||||
BEST_TIME(d.Parse((const char *)buffer).HasParseError(), false,
|
||||
memcpy(buffer, p.first, p.second), repeat, volume, true);
|
||||
BEST_TIME(d.ParseInsitu(buffer).HasParseError(), false,
|
||||
memcpy(buffer, p.first, p.second), repeat, volume, true);
|
||||
size_t strlength = rapidstringme((char*) p.first).size();
|
||||
std::cout << "input length is "<< p.second << " stringified length is " << strlength << std::endl;
|
||||
std::cout << "input length is "<< p.second << " stringified length is " << strlength << std::endl;
|
||||
BEST_TIME_NOCHECK(rapidstringme((char*) p.first), , repeat, volume,
|
||||
true);
|
||||
free(buffer);
|
||||
|
||||
Reference in New Issue
Block a user