Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit c9fb4a4

Browse files
authoredFeb 7, 2017
Update index.md
1 parent 477afc4 commit c9fb4a4

File tree

1 file changed

+1
-17
lines changed

1 file changed

+1
-17
lines changed
 

‎index.md

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

1010
Traditional JSON parsers are slow. Jsoniter Java version could be **3x** 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-
| 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 |
12+
![protobuf-vs-jsoniter](http://jsoniter.com/benchmarks/protobuf-vs-jsoniter.png)
2913

3014
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`.
3115

0 commit comments

Comments
 (0)
Please sign in to comment.