2021-10-10 20:26:30 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <cassert>
|
|
|
|
#include <cstdint>
|
|
|
|
#include <filesystem>
|
|
|
|
#include <fstream>
|
|
|
|
#include <iostream>
|
|
|
|
#include <stdexcept>
|
|
|
|
#include <string>
|
|
|
|
#include <tuple>
|
2021-10-13 22:33:08 +00:00
|
|
|
#include <map>
|
2021-10-10 20:26:30 +00:00
|
|
|
#include <vector>
|
|
|
|
|
2021-10-18 11:07:24 +00:00
|
|
|
//#define TEST_JSON_PERFORMANCE
|
2021-10-11 18:52:22 +00:00
|
|
|
|
2021-10-18 11:07:24 +00:00
|
|
|
#define USE_SIMDJSON_JSON // 14 seconds
|
2021-10-17 17:36:27 +00:00
|
|
|
//#define USE_BOOST_JSON // 28 seconds
|
2021-10-18 10:54:01 +00:00
|
|
|
//#define USE_NLOHMANN_JSON // 56 seconds
|
2021-10-18 11:07:24 +00:00
|
|
|
//#define USE_JSONCPP_JSON // 97 seconds
|
2021-10-18 10:54:01 +00:00
|
|
|
|
|
|
|
#ifdef USE_SIMDJSON_JSON
|
|
|
|
# define JSON_PREFER_PASS_BY_VALUE
|
|
|
|
# define JSON_PREFER_REUSE_OF_PARSER
|
|
|
|
# include "simdjson/simdjson.h"
|
|
|
|
#endif
|
2021-10-11 13:59:23 +00:00
|
|
|
|
|
|
|
#ifdef USE_BOOST_JSON
|
|
|
|
# include <boost/json.hpp>
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef USE_NLOHMANN_JSON
|
|
|
|
# include "nlohmann/json.hpp"
|
2021-10-11 18:13:05 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef USE_JSONCPP_JSON
|
2021-10-12 09:10:45 +00:00
|
|
|
# define JSON_PREFER_REUSE_OF_PARSER
|
2021-10-11 18:13:05 +00:00
|
|
|
# include <json/json.h>
|
|
|
|
#endif
|