mirror of
https://github.com/simdjson/simdjson
synced 2026-06-08 17:27:07 +00:00
Adds yyjson to our internal benchmarks. (#1244)
This commit is contained in:
@@ -37,3 +37,6 @@
|
||||
[submodule "dependencies/boost.json"]
|
||||
path = dependencies/boost.json
|
||||
url = https://github.com/CPPAlliance/json.git
|
||||
[submodule "dependencies/yyjson"]
|
||||
path = dependencies/yyjson
|
||||
url = https://github.com/ibireme/yyjson.git
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
#include "benchmark.h"
|
||||
|
||||
SIMDJSON_PUSH_DISABLE_ALL_WARNINGS
|
||||
#include "yyjson.h"
|
||||
|
||||
// #define RAPIDJSON_SSE2 // bad for performance
|
||||
// #define RAPIDJSON_SSE42 // bad for performance
|
||||
@@ -190,6 +191,17 @@ bool bench(const char *filename, bool verbose, bool just_data,
|
||||
|
||||
BEST_TIME("Boost.json", execute(sv), false, , repeat, volume, !just_data);
|
||||
}
|
||||
{
|
||||
|
||||
auto execute = [&p]() -> bool {
|
||||
yyjson_doc *doc = yyjson_read(p.data(), p.size(), 0);
|
||||
bool is_ok = doc != nullptr;
|
||||
yyjson_doc_free(doc);
|
||||
return is_ok;
|
||||
};
|
||||
|
||||
BEST_TIME("yyjson", execute(), true, , repeat, volume, !just_data);
|
||||
}
|
||||
#ifndef ALLPARSER
|
||||
if (!just_data)
|
||||
#endif
|
||||
|
||||
Vendored
+5
-1
@@ -72,8 +72,12 @@ if ((Git_FOUND) AND SIMDJSON_GIT AND (SIMDJSON_IS_UNDER_GIT))
|
||||
target_compile_definitions(boostjson PUBLIC BOOST_JSON_STANDALONE)
|
||||
target_include_directories(boostjson PUBLIC boost.json/include)
|
||||
|
||||
initialize_submodule(yyjson)
|
||||
add_library(yyjson yyjson/src/yyjson.c)
|
||||
target_include_directories(yyjson PUBLIC yyjson/src)
|
||||
|
||||
add_library(competition-core INTERFACE)
|
||||
target_link_libraries(competition-core INTERFACE competition-json competition-rapidjson competition-sajson competition-cJSON competition-jsmn boostjson)
|
||||
target_link_libraries(competition-core INTERFACE competition-json competition-rapidjson competition-sajson competition-cJSON competition-jsmn boostjson yyjson)
|
||||
|
||||
add_library(competition-all INTERFACE)
|
||||
target_link_libraries(competition-all INTERFACE competition-core competition-jsoncppdist competition-json11 competition-fastjson competition-gason competition-ujson4c)
|
||||
|
||||
+1
Submodule dependencies/yyjson added at aa33ec5a47
Reference in New Issue
Block a user