simdjson/benchmark/bench_ondemand.cpp

93 lines
2.7 KiB
C++
Raw Normal View History

#include "simdjson.h"
2021-01-02 13:15:03 +08:00
SIMDJSON_PUSH_DISABLE_ALL_WARNINGS
2021-01-02 13:15:03 +08:00
#ifdef SIMDJSON_COMPETITION_YYJSON
#include "yyjson.h"
#endif
2021-01-05 07:22:35 +08:00
#ifdef SIMDJSON_COMPETITION_RAPIDJSON
#include "rapidjson/document.h"
#include "rapidjson/reader.h"
#include "rapidjson/stringbuffer.h"
#include "rapidjson/writer.h"
#endif
2021-01-06 08:26:02 +08:00
#ifdef SIMDJSON_COMPETITION_SAJSON
#include "sajson.h"
#endif
2021-01-07 06:38:12 +08:00
#ifdef SIMDJSON_COMPETITION_NLOHMANN_JSON
#include <nlohmann/json.hpp>
#endif
// This has to be last, for reasons I don't yet understand
#include <benchmark/benchmark.h>
SIMDJSON_POP_DISABLE_WARNINGS
Bringing ndjson(document_stream) to On Demand (#1643) * Update basic.md to document JSON pointer for On Demand. * Add automatic rewind for at_pointer * Remove DOM examples in basics.md and update documentation reflecting addition of at_pointer automatic rewinding. * Review * Add test * Add document_stream constructors and iterate_many * Attempt to implement streaming. * Kind of fixed next() for getting next document * Temporary save. * Putting in working order. * Add working doc_index and add function next_document() * Attempt to implement streaming. * Re-anchoring json_iterator after a call to stage 1 * I am convinced it should be a 'while'. * Add source() with test. * Add truncated_bytes(). * Fix casting issues. * Fix old style cast. * Fix privacy issue. * Fix privacy issues. * Again * . * Add more tests. Add error() for iterator class. * Fix source() to not included whitespaces between documents. * Fixing CI. * Fix source() for multiple batches. Add new tests. * Fix batch_start when document has leading spaces. Add new tests for that. * Add new tests. * Temporary save. * Working hacky multithread version. * Small fix in header files. * Correct version (not working). * Adding a move assignment to ondemand::parser. * Fix attempt by changing std::swap. * Moving DEFAULT_BATCH_SIZE and MINIMAL_BATCH_SIZE. * Update doc and readme tests. * Update basics.md * Update readme_examples tests. * Fix exceptions in test. * Partial setup for amazon_cellphones. * Benchmark with vectors. * Benchmark with maps * With vectors again. * Fix for weighted average. * DOM benchmark. * Fix typos. Add On Demand benchmark. * Add large amazon_cellphones benchmark for DOM * Add benchmark for On demand. * Fix broken read_me test. * Add parser.threaded to enable/disable thread usage. Co-authored-by: Daniel Lemire <lemire@gmail.com>
2021-07-21 02:17:23 +08:00
#include "amazon_cellphones/simdjson_dom.h"
#include "amazon_cellphones/simdjson_ondemand.h"
#include "large_amazon_cellphones/simdjson_dom.h"
#include "large_amazon_cellphones/simdjson_ondemand.h"
#include "partial_tweets/simdjson_dom.h"
#include "partial_tweets/simdjson_ondemand.h"
2021-01-02 13:15:03 +08:00
#include "partial_tweets/yyjson.h"
2021-01-06 08:26:02 +08:00
#include "partial_tweets/sajson.h"
2021-01-05 07:22:35 +08:00
#include "partial_tweets/rapidjson.h"
#include "partial_tweets/rapidjson_sax.h"
2021-01-07 06:38:12 +08:00
#include "partial_tweets/nlohmann_json.h"
#include "partial_tweets/nlohmann_json_sax.h"
#include "large_random/simdjson_dom.h"
#include "large_random/simdjson_ondemand.h"
#include "large_random/simdjson_ondemand_unordered.h"
#include "large_random/yyjson.h"
2021-01-06 08:26:02 +08:00
#include "large_random/sajson.h"
2021-01-05 07:22:35 +08:00
#include "large_random/rapidjson.h"
#include "large_random/rapidjson_sax.h"
2021-01-07 06:38:12 +08:00
#include "large_random/nlohmann_json.h"
#include "large_random/nlohmann_json_sax.h"
#include "kostya/simdjson_dom.h"
#include "kostya/simdjson_ondemand.h"
2021-01-02 14:41:15 +08:00
#include "kostya/yyjson.h"
2021-01-06 08:26:02 +08:00
#include "kostya/sajson.h"
2021-01-05 07:22:35 +08:00
#include "kostya/rapidjson.h"
#include "kostya/rapidjson_sax.h"
2021-01-07 06:38:12 +08:00
#include "kostya/nlohmann_json.h"
#include "kostya/nlohmann_json_sax.h"
2021-01-02 13:15:03 +08:00
#include "distinct_user_id/simdjson_dom.h"
2021-06-18 06:31:40 +08:00
#include "distinct_user_id/simdjson_dom_json_pointer.h"
#include "distinct_user_id/simdjson_ondemand.h"
2021-06-18 06:31:40 +08:00
#include "distinct_user_id/simdjson_ondemand_json_pointer.h"
#include "distinct_user_id/yyjson.h"
2021-01-06 08:26:02 +08:00
#include "distinct_user_id/sajson.h"
2021-01-05 07:22:35 +08:00
#include "distinct_user_id/rapidjson.h"
#include "distinct_user_id/rapidjson_sax.h"
2021-01-07 06:38:12 +08:00
#include "distinct_user_id/nlohmann_json.h"
#include "distinct_user_id/nlohmann_json_sax.h"
#include "find_tweet/simdjson_dom.h"
#include "find_tweet/simdjson_ondemand.h"
#include "find_tweet/yyjson.h"
2021-01-06 08:26:02 +08:00
#include "find_tweet/sajson.h"
2021-01-05 07:22:35 +08:00
#include "find_tweet/rapidjson.h"
#include "find_tweet/rapidjson_sax.h"
2021-01-07 06:38:12 +08:00
#include "find_tweet/nlohmann_json.h"
#include "find_tweet/nlohmann_json_sax.h"
#include "top_tweet/simdjson_dom.h"
#include "top_tweet/simdjson_ondemand.h"
#include "top_tweet/yyjson.h"
#include "top_tweet/sajson.h"
#include "top_tweet/rapidjson.h"
#include "top_tweet/rapidjson_sax.h"
#include "top_tweet/nlohmann_json.h"
#include "top_tweet/nlohmann_json_sax.h"
BENCHMARK_MAIN();