Skip to content

Commit 1b68f62

Browse files
authored
Update index.md
1 parent 582301e commit 1b68f62

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

index.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,23 @@ jsoniter (json-iterator) is fast and flexible JSON parser available in [Java](ht
99

1010
Traditional JSON parsers are very slow. Jsoniter Java version could be **4x** times faster than jackson/gson/fastjson. If you are doing a lot of log processing or number crunching, but stuck with JSON, you definitely need to consider [dsl-json](https://github.com/ngs-doo/dsl-json) or Jsoniter to save the encoding/decoding cost. According to dsl-json, the JSON encoding/decoding speed is not a problem, [even faster than thrift/avro](https://www.codeproject.com/Articles/1165627/Jsoniter-JSON-is-faster-than-thrift-avro)
1111

12-
![java1](http://jsoniter.com/benchmarks/java1.png)
12+
| scenario | Protobuf V.S. Jackson | Protobuf V.S. Jsoniter | Jsoniter V.S Jackson |
13+
| --- | --- | --- | --- |
14+
| Decode Integer | 8.51 | 2.64 | 3.22 |
15+
| Encode Integer | 2.9 | 1.44 | 2.02 |
16+
| Decode Double | 13.75 | 4.4 | 3.13 |
17+
| Encode Double | 12.71 | 1.96 (only 6 digits precision) | 6.5 |
18+
| Decode Object | 1.22 | 0.6 | 2.04 |
19+
| Encode Object | 1.72 | 0.67 | 2.59 |
20+
| Decode Integer List | 2.92 | 0.98 | 2.97 |
21+
| Encode Integer List | 1.35 | 0.71 | 1.9 |
22+
| Decode Object List | 1.26 | 0.43 | 2.91 |
23+
| Encode Object List | 2.22 | 0.61 | 3.63 |
24+
| Decode Double Array | 5.18 | 1.47 | 3.52 |
25+
| Encode Double Array | 15.63 | 2.32 (only 6 digits precision) | 6.74 |
26+
| Decode String | 1.85 | 0.77 | 2.4 |
27+
| Encode String | 0.96 | 0.63 | 1.5 |
28+
| Skip Structure | 5.05 | 1.35 | 3.75 |
1329

1430
Jsoniter Golang version could be more than **6x** times faster than standard lib (encoding/json). And the number is acheived with runtime reflection instead of `go generate`.
1531

0 commit comments

Comments
 (0)