Skip to content

Commit 0d35d4d

Browse files
committed
Add results using GCC 4.7 on Linux 64-bit
1 parent 546e51a commit 0d35d4d

File tree

1 file changed

+44
-18
lines changed

1 file changed

+44
-18
lines changed

README.md

Lines changed: 44 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
json_benchmark
1+
JSON Benchmark
22
==============
33

44
Simple benchmark for a number of C++ JSON libraries.
@@ -42,35 +42,59 @@ There are two sets of JSON test data:
4242
* ```data/one-json-per-line.jsons``` collection of 500 sample JSON strings from sub-100 to 500 characters long.
4343

4444

45-
Note, all libraries are used to read and parse strings of narrow ```char```
45+
Important notes:
46+
* All timings obtained running optimised builds of the binaries.
47+
* All libraries are used to read and parse strings of narrow ```char```
4648
characters (i.e. ```std::string```), no ```wchar_t``` strings are used.
49+
* rapidjson was used in DOM parsing mode, not SAX
50+
* libjson supports lazy parsing, times collected for this modes was:
51+
```
52+
libjson.small: 1000 iterations of 500 parsings in 0.478065 to 0.486636 sec based on 2 benchmarks
53+
```
4754

48-
All timings obtained running optimised builds of the binaries.
49-
50-
Visual C++ 11.0
51-
---------------
55+
GCC 4.7 (64-bit build)
56+
----------------------
5257

58+
HW: Intel(R) Xeon(R) CPU E5-2630L 0 @ 2.00GHz, 2 GB RAM
59+
OS: Linux 64-bit (Debian 7)
60+
5361
* small
5462

5563
```
56-
rapidjson.small: 2 marks of 1000 x 500 batch of parsings in 0.961858 to 0.962361 per batch
57-
libjson.small: 2 marks of 1000 x 500 batch of parsings in 5.2787 to 5.29663 per batch
58-
jsoncpp.small: 2 marks of 1000 x 500 batch of parsings in 5.762 to 5.77978 per batch
59-
casablanca.small: 2 marks of 1000 x 500 batch of parsings in 17.7374 to 17.7587 per batch
60-
spirit.small: 2 marks of 1000 x 500 batch of parsings in 22.137 to 22.137 per batch
64+
rapidjson.small: 1000 iterations of 500 parsings in 1.08639 to 1.08639 sec based on 2 benchmarks
65+
jsoncpp.small: 1000 iterations of 500 parsings in 18.5563 to 19.6208 sec based on 2 benchmarks
66+
spirit.small: 1000 iterations of 500 parsings in 27.4479 to 27.4479 sec based on 2 benchmarks
6167
```
68+
6269
* large
6370

6471
```
65-
rapidjson.large: 2 marks of 1000 x 1 batch of parsings in 7.96621 to 7.97555 sec per batch
66-
libjson.large: 2 marks of 1000 x 1 batch of parsings in 240.289 to 240.289 sec per batch
72+
rapidjson.large: 1000 iterations of 1 parsings in 13.8156 to 14.2241 sec based on 2 benchmarks
73+
jsoncpp.large: 1000 iterations of 1 parsings in 376.313 to 384.015 sec based on 2 benchmarks
74+
spirit.large: 1000 iterations of 1 parsings in 988.167 to 995.634 sec based on 2 benchmarks
6775
```
6876

69-
Notes:
70-
* rapidjson was used in DOM parsing mode, not SAX
71-
* libjson supports lazy parsing, times collected for this modes was:
77+
Visual C++ 11.0 (32-bit build)
78+
------------------------------
79+
80+
HW: Intel(R) Xeon(R) CPU E5-2687W 0 @ 3.10GHz, 16 GB RAM
81+
OS: Windows 7 64-bit
82+
83+
* small
84+
85+
```
86+
rapidjson.small: 1000 iterations of 500 parsings in 0.961858 to 0.962361 sec based on 2 benchmarks
87+
libjson.small: 1000 iterations of 500 parsings in 5.2787 to 5.29663 sec based on 2 benchmarks
88+
jsoncpp.small: 1000 iterations of 500 parsings in 5.762 to 5.77978 sec based on 2 benchmarks
89+
casablanca.small: 1000 iterations of 500 parsings in 17.7374 to 17.7587 sec based on 2 benchmarks
90+
spirit.small: 1000 iterations of 500 parsings in 22.137 to 22.137 sec based on 2 benchmarks
91+
```
92+
93+
* large
94+
7295
```
73-
libjson.small: 2 marks of 1000 x 500 batch of parsings in 0.478065 to 0.486636 per batch
96+
rapidjson.large: 1000 iterations of 1 parsings in 7.96621 to 7.97555 sec based on 2 benchmarks
97+
libjson.large: 1000 iterations of 1 parsings in 240.289 to 240.289 sec based on 2 benchmarks
7498
```
7599

76100
JSON Writing
@@ -96,7 +120,9 @@ Alternatively, set the environment variables:
96120

97121
The environment variables can be passed directly on the Boost.Build invocation:
98122
```
99-
b2 -sBOOST_ROOT=/home/mloskot/boost/trunk -sJSON_SPIRIT_ROOT=/home/mloskot/json_spirit
123+
b2 -sBOOST_ROOT=/home/mloskot/boost/trunk \
124+
-sJSON_SPIRIT_ROOT=/home/mloskot/json_spirit \
125+
-sRAPIDJSON_ROOT=/home/mloskot/rapidjson
100126
```
101127
and so on.
102128

0 commit comments

Comments
 (0)