1 #pragma once 2 3 #if SIMDJSON_EXCEPTIONS 4 5 #include "kostya.h" 6 7 namespace kostya { 8 9 using namespace simdjson; 10 11 struct simdjson_dom { 12 static constexpr diff_flags DiffFlags = diff_flags::NONE; 13 14 dom::parser parser{}; 15 runsimdjson_dom16 bool run(simdjson::padded_string &json, std::vector<point> &result) { 17 for (auto point : parser.parse(json)["coordinates"]) { 18 result.emplace_back(json_benchmark::point{point["x"], point["y"], point["z"]}); 19 } 20 return true; 21 } 22 }; 23 24 BENCHMARK_TEMPLATE(kostya, simdjson_dom)->UseManualTime(); 25 26 } // namespace kostya 27 28 #endif // SIMDJSON_EXCEPTIONS