You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Four different sizes of payloads are evaluated in the charts below: 1 KB, 10 KB, 100 KB and 1 MB. And it is possible to generate on the fly any size of payloads.
35
+
This benchmark is written to:
36
+
* randomly generate payloads upon static loading of the JVM/benchmark; the *seed* is also shared across runs
37
+
* read data from RAM
38
+
* write data to reusable output streams (when possible); this reduces allocation pressure
39
+
* consume all output streams; to avoid dead code elimination optimization
33
40
34
-
Each benchmark is written to read bytes from RAM and write to reusable output streams in RAM when possible, strings are rarely generated. All data is randomly generated upon static loading.
35
-
36
-
This benchmark does NOT evaluate:
37
-
38
-
* compression performance or efficiency
39
-
* payloads bigger than 1.1 MB (would be easy to do though)
40
-
* RAM utilization
41
+
Not evaluated are: RAM utilization, compression, payloads > 1 MB.
41
42
42
43
## Results
43
44
44
45
The benchmarks are written with [JMH](http://openjdk.java.net/projects/code-tools/jmh/) and for Java 8.
45
46
46
-
The results here-below were computed on May the 21st, 2017 with the following libraries and versions:
47
+
The results here-below were computed on April the 8th, 2018 with the following libraries and versions:
48
+
49
+
| Library | Version |
50
+
|--------------|----------|
51
+
| jackson | 2.9.5 |
52
+
| genson | 1.4 |
53
+
| fastjson | 1.2.47 |
54
+
| gson | 2.8.2 |
55
+
| org.json | 20090211 |
56
+
| javax-json | 1.1.2 |
57
+
| json-io | 4.10.0 |
58
+
| flexjson | 3.3 |
59
+
| boon | 0.34 |
60
+
| json-smart | 2.3 |
61
+
| johnzon | 1.1.1 |
62
+
| logansquare | 1.3.7 |
63
+
| dsl-json | 1.7.1 |
64
+
| simplejson | 1.1.1 |
65
+
| nanojson | 1.2 |
66
+
| jodd json | 4.3.0 |
67
+
| moshi | 1.5.0 |
68
+
| tapestry | 5.4.3 |
69
+
| jsoniter | 0.9.22 |
70
+
| minimal-json | 0.9.5 |
71
+
72
+
[All graphs and sheets are available in this google doc.](https://docs.google.com/spreadsheets/d/1gI5-FFWwPjf4pxgYE0cEfbFIyNUGL8ci4NKLjTozU5I/edit?usp=sharing)
73
+
74
+
[Raw JMH results are available here][jmh-results]
75
+
76
+
### `Users` model
77
+
78
+
Uses: primitive types, String, List and simple POJOs
47
79
48
-
| Library | Version |
49
-
|-------------|---------|
50
-
| jackson | 2.9.4 |
51
-
| genson | 1.4 |
52
-
| fastjson | 1.2.32 |
53
-
| gson | 2.8.2 |
54
-
| org.json | 20090211 |
55
-
| javax-json | 1.0, 1.0.4 |
56
-
| json-io | 4.9.12 |
57
-
| flexjson | 3.3 |
58
-
| boon | 0.34 |
59
-
| json-smart | 2.3 |
60
-
| johnzon | 1.1.0 |
61
-
| logansquare | 1.3.7 |
62
-
| dsl-json | 1.7.0 |
63
-
| simplejson | 1.1.1 |
64
-
| nanojson | 1.2 |
65
-
| jodd json | 3.8.5 |
66
-
| moshi | 1.5.0 |
67
-
| tapestry | 5.4.3 |
68
-
| jsoniter | 0.9.11 |
80
+
**Deserialization performance**
81
+

69
82
70
-
[All graphs and sheets are available in this google doc.](https://docs.google.com/spreadsheets/d/16GSfiTSRP2WKu3XxqNPIW_0KvZ2PezjFMHqTHrG-XZU/edit?usp=sharing)
83
+
**Serialization performance**
84
+

Uses: primitive types, String, List and simple POJOs, arrays, enum, UUID, LocalDate
75
89
76
-
[Raw JMH results here][jmh-results]
90
+
Note: fewer libraries are tested with this model due to lack of support for some of the evaluated types.
77
91
78
-
### Serialization performance
92
+
**Deserialization performance**
93
+


81
97
82
-
[Raw JMH results here][jmh-results]
83
98
84
99
### Benchmark configuration
85
100
86
101
#### JMH
87
102
88
-
# JMH version: 1.19
89
-
# VM version: JDK 1.8.0_121, VM 25.121-b13
90
-
# VM invoker: /Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/jre/bin/java
103
+
# JMH version: 1.20
104
+
# VM version: JDK 1.8.0_131, VM 25.131-b11
105
+
# VM invoker: /Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/jre/bin/java
91
106
# VM options: -XX:+AggressiveOpts -Xms2G -Xmx2G
92
107
# Warmup: 5 iterations, 1 s each
93
108
# Measurement: 10 iterations, 3 s each
@@ -141,4 +156,4 @@ find numerous examples in the commit history. For instance:
0 commit comments