@@ -30,7 +30,7 @@ void print_vec(const std::vector<int64_t> &v) {
3030 std::cout << std::endl;
3131}
3232
33- void simdjson_scan (std::vector<int64_t > &answer, simdjson::document::iterator i) {
33+ void simdjson_scan (std::vector<int64_t > &answer, simdjson::ParsedJson::Iterator i) {
3434 while (i.move_forward ()) {
3535 if (i.get_scope_type () == ' {' ) {
3636 bool found_user = (i.get_string_length () == 4 ) &&
@@ -49,18 +49,18 @@ void simdjson_scan(std::vector<int64_t> &answer, simdjson::document::iterator i)
4949}
5050
5151__attribute__ ((noinline)) std::vector<int64_t>
52- simdjson_just_dom(simdjson::document &doc ) {
52+ simdjson_just_dom(simdjson::ParsedJson &pj ) {
5353 std::vector<int64_t > answer;
54- simdjson_scan (answer, doc );
54+ simdjson_scan (answer, pj );
5555 remove_duplicates (answer);
5656 return answer;
5757}
5858
5959__attribute__ ((noinline)) std::vector<int64_t>
6060simdjson_compute_stats(const simdjson::padded_string &p) {
6161 std::vector<int64_t > answer;
62- auto [doc, error] = simdjson::document::parse (p);
63- simdjson_scan (answer, doc );
62+ ParsedJson pj = simdjson::build_parsed_json (p);
63+ simdjson_scan (answer, pj );
6464 remove_duplicates (answer);
6565 return answer;
6666}
@@ -319,7 +319,7 @@ int main(int argc, char *argv[]) {
319319 volume, !just_data);
320320 BEST_TIME (" sasjon (just parse) " , sasjon_just_parse (p), false , , repeat,
321321 volume, !just_data);
322- auto [ dsimdjson, dsimdjson_error] = simdjson::document::parse (p);
322+ ParsedJson dsimdjson = build_parsed_json (p);
323323 BEST_TIME (" simdjson (just dom) " , simdjson_just_dom (dsimdjson).size (), size,
324324 , repeat, volume, !just_data);
325325 char *buffer = (char *)malloc (p.size ());
0 commit comments