Skip to content

Commit 6a2728e

Browse files
vitlibarlemire
authored andcommitted
No allocation in the iterator's constructor (simdjson#276)
* Get rid of dynamic allocation in ParsedJson::Iterator. * Implement copy assignment operator for ParsedJson::Iterator. * ParsedJson::Iterator is now a template class.
1 parent 1740d93 commit 6a2728e

File tree

8 files changed

+691
-667
lines changed

8 files changed

+691
-667
lines changed

amalgamation.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ $SCRIPTPATH/include/simdjson/simdutf8check_westmere.h
4646
$SCRIPTPATH/include/simdjson/simdutf8check_arm64.h
4747
$SCRIPTPATH/include/simdjson/jsonminifier.h
4848
$SCRIPTPATH/include/simdjson/parsedjson.h
49+
$SCRIPTPATH/include/simdjson/parsedjsoniterator.h
4950
$SCRIPTPATH/include/simdjson/stage1_find_marks.h
5051
$SCRIPTPATH/include/simdjson/stage1_find_marks_westmere.h
5152
$SCRIPTPATH/include/simdjson/stage1_find_marks_haswell.h

include/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ set(SIMDJSON_INCLUDE
1010
${SIMDJSON_INCLUDE_DIR}/numberparsing.h
1111
${SIMDJSON_INCLUDE_DIR}/padded_string.h
1212
${SIMDJSON_INCLUDE_DIR}/parsedjson.h
13+
${SIMDJSON_INCLUDE_DIR}/parsedjsoniterator.h
1314
${SIMDJSON_INCLUDE_DIR}/portability.h
1415
${SIMDJSON_INCLUDE_DIR}/simdjson.h
1516
${SIMDJSON_INCLUDE_DIR}/simdjson_version.h

include/simdjson/jsonparser.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
#include "simdjson/jsonioutil.h"
55
#include "simdjson/padded_string.h"
66
#include "simdjson/parsedjson.h"
7+
#include "simdjson/parsedjsoniterator.h"
78
#include "simdjson/simdjson.h"
89
#include "simdjson/stage1_find_marks.h"
910
#include "simdjson/stage2_build_tape.h"

include/simdjson/numberparsing.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
#include "simdjson/jsoncharutils.h"
66
#include "simdjson/parsedjson.h"
77
#include "simdjson/portability.h"
8+
#include <cmath>
89

910
#ifdef JSON_TEST_NUMBERS // for unit testing
1011
void found_invalid_number(const uint8_t *buf);

0 commit comments

Comments
 (0)