Skip to content

Commit 3ad1449

Browse files
authored
Update benchmark.md
1 parent 4c57b1e commit 3ad1449

File tree

1 file changed

+19
-67
lines changed

1 file changed

+19
-67
lines changed

benchmark.md

Lines changed: 19 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -23,73 +23,25 @@ Machine Used:
2323
* Threads: 16 threads, will synchronize iterations
2424
* Benchmark mode: Throughput, ops/time
2525

26-
## 1 kb
27-
28-
[bind json to object](https://github.com/json-iterator/java-json-benchmark/blob/master/src/main/java/com/github/fabienrenaud/jjb/databind/Deserialization.java)
29-
30-
| parser | score |
31-
| --- | --- |
32-
| [jackson] | 177084.689 ± 1799.302 ops/s |
33-
| [gson] | 93788.846 ± 1818.627 ops/s |
34-
| [fastjson] | 104953.993 ± 538.658 ops/s |
35-
| [dsljson] | 330153.573 ± 25947.852 ops/s |
36-
| jsoniter (bind-api) | 402531.206 ± 7187.885 ops/s |
37-
38-
![java1](http://jsoniter.com/benchmarks/java1.png)
39-
40-
## 10 kb
41-
42-
[bind json to object](https://github.com/json-iterator/java-json-benchmark/blob/master/src/main/java/com/github/fabienrenaud/jjb/databind/Deserialization.java)
43-
44-
| parser | score |
45-
| --- | --- |
46-
| [jackson] | 28726.365 ± 229.004 ops/s |
47-
| [gson] | 16188.633 ± 340.709 ops/s |
48-
| [fastjson] | 17389.340 ± 116.701 ops/s |
49-
| [dsljson] | 58355.070 ± 421.090 ops/s |
50-
| jsoniter (bind-api) | 63245.508 ± 487.530 ops/s |
51-
52-
![java10](http://jsoniter.com/benchmarks/java10.png)
53-
54-
## 100 kb
55-
56-
[bind json to object](https://github.com/json-iterator/java-json-benchmark/blob/master/src/main/java/com/github/fabienrenaud/jjb/databind/Deserialization.java)
57-
58-
| parser | score |
59-
| --- | --- |
60-
| [jackson] | 2888.322 ± 18.957 ops/s |
61-
| [gson] | 1618.855 ± 33.972 ops/s |
62-
| [fastjson] | 1560.112 ± 14.711 ops/s |
63-
| [dsljson] | 5718.177 ± 92.220 ops/s |
64-
| jsoniter (bind-api) | 6269.253 ± 44.716 ops/s |
65-
66-
![java100](http://jsoniter.com/benchmarks/java100.png)
67-
68-
# Java Iterator API
69-
70-
## 1000 kb
71-
72-
[count number of elements from InputStream without binding](https://github.com/json-iterator/java-json-benchmark/blob/master/src/main/java/com/github/fabienrenaud/jjb/stream/UsersStreamDeserializer.java#L352)
73-
74-
| parser | score |
75-
| --- | --- |
76-
| [javaxjson] | 1192.041 ± 71.521 ops/s |
77-
| [jackson] | 1919.180 ± 122.895 ops/s |
78-
| jsoniter (iterator-api) | 3165.283 ± 106.326 ops/s |
79-
80-
![java1000](http://jsoniter.com/benchmarks/java1000.png)
81-
82-
## 10000 kb
83-
84-
[count number of elements from InputStream without binding](https://github.com/json-iterator/java-json-benchmark/blob/master/src/main/java/com/github/fabienrenaud/jjb/stream/UsersStreamDeserializer.java#L352)
85-
86-
| parser | score |
87-
| --- | --- |
88-
| [javaxjson] | 113.544 ± 6.153 ops/s |
89-
| [jackson] | 199.957 ± 7.669 ops/s |
90-
| jsoniter (iterator-api) | 274.039 ± 17.785 ops/s |
91-
92-
![java10000](http://jsoniter.com/benchmarks/java10000.png)
26+
https://github.com/json-iterator/java-benchmark
27+
28+
| scenario | Protobuf V.S. Jackson | Protobuf V.S. Jsoniter | Jsoniter V.S Jackson |
29+
| --- | --- | --- | --- |
30+
| Decode Integer | 8.51 | 2.64 | 3.22 |
31+
| Encode Integer | 2.9 | 1.44 | 2.02 |
32+
| Decode Double | 13.75 | 4.4 | 3.13 |
33+
| Encode Double | 12.71 | 1.96 (only 6 digits precision) | 6.5 |
34+
| Decode Object | 1.22 | 0.6 | 2.04 |
35+
| Encode Object | 1.72 | 0.67 | 2.59 |
36+
| Decode Integer List | 2.92 | 0.98 | 2.97 |
37+
| Encode Integer List | 1.35 | 0.71 | 1.9 |
38+
| Decode Object List | 1.26 | 0.43 | 2.91 |
39+
| Encode Object List | 2.22 | 0.61 | 3.63 |
40+
| Decode Double Array | 5.18 | 1.47 | 3.52 |
41+
| Encode Double Array | 15.63 | 2.32 (only 6 digits precision) | 6.74 |
42+
| Decode String | 1.85 | 0.77 | 2.4 |
43+
| Encode String | 0.96 | 0.63 | 1.5 |
44+
| Skip Structure | 5.05 | 1.35 | 3.75 |
9345

9446
# Go Bind API
9547

0 commit comments

Comments
 (0)