eishay / jvm-serializers

Benchmark comparing serialization libraries on the JVM
http://groups.google.com/group/java-serialization-benchmarking
3.29k stars 562 forks source link

fastjson 1.2.11 version, performance beyond protobuf #66

Closed wenshao closed 8 years ago

wenshao commented 8 years ago

my test result

                                   create     ser   deser   total   size  +dfl
json-array/fastjson/databind          123    1289    1567    2856    281   163
json/fastjson/databind                120    2019    2610    4629    486   262
json/jackson+afterburner/databind     118    2142    3147    5289    485   261
json/jackson/databind                 124    2914    4411    7326    485   261
msgpack/databind                      122    1525    2180    3705    233   146
protobuf                              244    2297    1296    3593    239   149

https://github.com/alibaba/fastjson/wiki/Benchmark_1_2_11

wenshao commented 8 years ago

Thank you, the problem has been fixed. Would you please see if you can merge the request.

pascaldekloe commented 8 years ago

Hi @wenshao, Why did you create another benchmark / file? Can't we just upgrade the existing one?

wenshao commented 8 years ago
                                   create     ser   deser   total   size  +dfl
avro-generic                          538    3329    2542    5870    221   133
avro-specific                         175    2890    3353    6242    221   133
bson/jackson/databind                  99    7860   10407   18266    506   286
bson/mongodb/manual                    98    4264   16140   20405    495   278
capnproto                             108    3406    2292    5699    400   204
cbor-col/jackson/databind             108    1519    2505    4024    251   165
cbor/jackson+afterburner/databind     105    1702    2429    4130    397   246
cbor/jackson/databind                 107    2205    3361    5566    397   246
cbor/jackson/manual                   112    1493    2083    3576    386   238
colfer                                213     557     645    1203    237   147
datakernel                            116    1077     860    1937    225   133
flatbuffers                           107    2253    1372    3625    432   226
fst-flat-pre                          112     864    1396    2259    251   165
fst-flat                              112    1325    1937    3262    314   204
fst                                   114    2454    3763    6217    316   203
hessian                               109    6783    9575   16358    501   313
java-built-in                         109    9090   69665   78755    889   514
java-built-in-serializer              109    9312   71857   81170    889   514
java-manual                           112    1427    1086    2514    255   147
jboss-marshalling-river-ct-manual     112    2286    2492    4778    289   167
jboss-marshalling-river-ct            107    4294    4618    8912    298   199
jboss-marshalling-river-manual        114    2883    8905   11788    483   240
jboss-marshalling-river               106    6350   55779   62130    694   400
jboss-marshalling-serial              112   16035   76410   92445    856   498
jboss-serialization                    99   10040   10753   20793    932   582
json-array/fastjson/databind          111    1256    1418    2674    281   163
json/argo/manual-tree                 108  113793   34647  148440    485   263
json-col/jackson/databind             100    1902    2777    4679    293   178
json/dsl-platform                      94     948    1508    2456    485   261
json/fastjson/databind                113    1986    2459    4445    486   262
json/flexjson/databind                110   22461   48224   70685    503   273
json/gson/databind                    107    8063   11257   19319    486   259
json/gson/manual                      116    5329   10224   15554    468   253
json/gson/manual-tree                 110    8717   22590   31307    485   259
json/jackson+afterburner/databind     108    2276    2972    5248    485   261
json/jackson/databind                 112    2802    4119    6921    485   261
json/jackson-jr/databind              108    2914    4120    7034    468   255
json/jackson/manual                   112    1928    2488    4416    468   253
json/javax-stream/glassfish           112   13948   20151   34098    468   253
json/javax-tree/glassfish            1963   17480   22137   39617    485   263
json/jsonij/manual-jpath              114   38625   22273   60898    478   258
json/json-lib/databind                112   49175  335148  384323    485   263
json/json.simple/manual               110   10641   15294   25935    495   265
json/json-smart/manual-tree           111    7960    6478   14438    495   265
json/org.json/manual-tree             111   10635   14077   24712    485   259
json/protobuf                         220   13414  112405  125820    488   253
json/protostuff-manual                108    2274    2958    5233    449   233
json/protostuff-runtime               107    2524    3143    5667    469   243
json/svenson/databind                 108    6903   29317   36220    495   267
kryo-flat-pre                         107     917    1239    2156    212   132
kryo-flat                             106    1192    1906    3098    268   177
kryo-manual                           112     772     920    1692    211   131
kryo-opt                              114     873    1218    2090    209   129
kryo-serializer                       106    2310    2425    4734    286   188
minified-json/dsl-platform             88     810    1250    2060    353   197
msgpack/databind                      114    1392    2044    3436    233   146
msgpack/manual                        114    1472    2019    3491    233   146
protobuf/protostuff                   142     828    1124    1952    239   149
protobuf/protostuff-runtime           112    1127    1475    2602    241   150
protobuf                              222    2093    1361    3454    239   149
protostuff-graph                      142    1074    1218    2292    239   150
protostuff-graph-runtime              110    1448    1596    3045    241   151
protostuff-manual                     112     731    1189    1921    239   150
protostuff                            142     783    1166    1949    239   150
protostuff-runtime                     98    1097    1401    2498    241   151
scala/java-built-in                   768   17043  114234  131277   1293   698
scala/sbinary                         903    2391    2338    4730    255   147
smile-col/jackson/databind             99    1496    2550    4046    252   165
smile/jackson+afterburner/databind    109    1861    2289    4150    352   252
smile/jackson/databind                113    2331    2823    5154    338   241
smile/jackson/manual                  114    1539    1740    3279    341   244
stephenerialization                   107   10765   78270   89035   1093   515
thrift-compact                        200    2233    1545    3778    240   148
thrift                                200    2606    1298    3903    349   197
wobly-compact                          75    1309     956    2265    225   139
wobly                                  74    1223     886    2108    251   151
xml/aalto-manual                      112    3390    5255    8645    653   304
xml/exi-manual                        105   24260   25765   50025    337   327
xml/fastinfo-manual                   106   10226   10190   20415    377   284
xml/jackson/databind                  109    4990    9010   14001    683   286
xml/javolution/manual                 113    8697   14162   22859    504   263
xml/JAXB/aalto                         98    8676   23353   32029    702   318
xml/JAXB                              110    8856  588637  597494    719   329
xml/woodstox-manual                   109    4552    7594   12146    653   304
xml/xstream+c-aalto                   106    6793   19519   26312    525   273
xml/xstream+c-fastinfo                115   12612   18577   31189    345   264
xml/xstream+c                         112   10268   29378   39646    487   244
xml/xstream+c-woodstox                108    7984   22454   30438    525   273
yaml/jackson/databind                 109   27934   94934  122867    505   260
wenshao commented 8 years ago

Test Platform

OS:Linux JVM:Oracle Corporation 1.8.0_91 CPU:null os-arch:null Cores (incl HT):1

Disclaimer

This test focusses on en/decoding of a cyclefree data structure, but the featureset of the libraries compared differs a lot:

(See "ToolBehavior":wiki/ToolBehavior) Other test data will yield different results (e.g. adding a non ascii char to every string :-) ). However the results give a raw estimation of library performance.

Serializers (no shared refs)

Benchmarks serializers

Ser Time+Deser Time (ns)

Size, Compressed size [light] in bytes

                                   create     ser   deser   total   size  +dfl
colfer                                213     557     645    1203    237   147
protostuff                            142     783    1166    1949    239   150
minified-json/dsl-platform             88     810    1250    2060    353   197
kryo-flat-pre                         107     917    1239    2156    212   132
fst-flat-pre                          112     864    1396    2259    251   165
json/dsl-platform                      94     948    1508    2456    485   261
json/fastjson_array/databind          111    1256    1418    2674    281   163
msgpack/databind                      114    1392    2044    3436    233   146
protobuf                              222    2093    1361    3454    239   149
flatbuffers                           107    2253    1372    3625    432   226
thrift-compact                        200    2233    1545    3778    240   148
thrift                                200    2606    1298    3903    349   197
cbor-col/jackson/databind             108    1519    2505    4024    251   165
smile-col/jackson/databind             99    1496    2550    4046    252   165
cbor/jackson+afterburner/databind     105    1702    2429    4130    397   246
smile/jackson+afterburner/databind    109    1861    2289    4150    352   252
json/fastjson/databind                113    1986    2459    4445    486   262
json-col/jackson/databind             100    1902    2777    4679    293   178
scala/sbinary                         903    2391    2338    4730    255   147
smile/jackson/databind                113    2331    2823    5154    338   241
json/jackson+afterburner/databind     108    2276    2972    5248    485   261
cbor/jackson/databind                 107    2205    3361    5566    397   246
json/protostuff-runtime               107    2524    3143    5667    469   243
capnproto                             108    3406    2292    5699    400   204
json/jackson/databind                 112    2802    4119    6921    485   261
json/jackson-jr/databind              108    2914    4120    7034    468   255
xml/jackson/databind                  109    4990    9010   14001    683   286
bson/jackson/databind                  99    7860   10407   18266    506   286
json/gson/databind                    107    8063   11257   19319    486   259
json/javax-tree/glassfish            1963   17480   22137   39617    485   263
xml/xstream+c                         112   10268   29378   39646    487   244
xml/exi-manual                        105   24260   25765   50025    337   327
java-built-in                         109    9090   69665   78755    889   514
json/protobuf                         220   13414  112405  125820    488   253
scala/java-built-in                   768   17043  114234  131277   1293   698
json/json-lib/databind                112   49175  335148  384323    485   263

Full Object Graph Serializers

Contains serializer(-configurations)

Ser Time+Deser Time (ns)

Size, Compressed size [light] in bytes

                                   create     ser   deser   total   size  +dfl
protostuff-graph                      142    1074    1218    2292    239   150
protostuff-graph-runtime              110    1448    1596    3045    241   151
kryo-serializer                       106    2310    2425    4734    286   188
fst                                   114    2454    3763    6217    316   203
jboss-marshalling-river-ct            107    4294    4618    8912    298   199
hessian                               109    6783    9575   16358    501   313
jboss-serialization                    99   10040   10753   20793    932   582
xml/JAXB/aalto                         98    8676   23353   32029    702   318
jboss-marshalling-river               106    6350   55779   62130    694   400
json/flexjson/databind                110   22461   48224   70685    503   273
java-built-in-serializer              109    9312   71857   81170    889   514
stephenerialization                   107   10765   78270   89035   1093   515
jboss-marshalling-serial              112   16035   76410   92445    856   498
yaml/jackson/databind                 109   27934   94934  122867    505   260
xml/JAXB                              110    8856  588637  597494    719   329

Cross Lang Binary Serializers

Contains serializer(-configurations)

Ser Time+Deser Time (ns)

Size, Compressed size [light] in bytes

                                   create     ser   deser   total   size  +dfl
colfer                                213     557     645    1203    237   147
protobuf/protostuff                   142     828    1124    1952    239   149
protobuf/protostuff-runtime           112    1127    1475    2602    241   150
msgpack/databind                      114    1392    2044    3436    233   146
protobuf                              222    2093    1361    3454    239   149
flatbuffers                           107    2253    1372    3625    432   226
thrift-compact                        200    2233    1545    3778    240   148
thrift                                200    2606    1298    3903    349   197
cbor/jackson/databind                 107    2205    3361    5566    397   246
capnproto                             108    3406    2292    5699    400   204
hessian                               109    6783    9575   16358    501   313
bson/jackson/databind                  99    7860   10407   18266    506   286

XML/JSon Serializers

Ser Time+Deser Time (ns)

Size, Compressed size [light] in bytes

                                   create     ser   deser   total   size  +dfl
minified-json/dsl-platform             88     810    1250    2060    353   197
json/dsl-platform                      94     948    1508    2456    485   261
json/fastjson_array/databind          111    1256    1418    2674    281   163
cbor-col/jackson/databind             108    1519    2505    4024    251   165
smile-col/jackson/databind             99    1496    2550    4046    252   165
json/fastjson/databind                113    1986    2459    4445    486   262
json-col/jackson/databind             100    1902    2777    4679    293   178
json/protostuff-runtime               107    2524    3143    5667    469   243
json/jackson/databind                 112    2802    4119    6921    485   261
json/jackson-jr/databind              108    2914    4120    7034    468   255
xml/jackson/databind                  109    4990    9010   14001    683   286
json/gson/databind                    107    8063   11257   19319    486   259
xml/JAXB/aalto                         98    8676   23353   32029    702   318
json/javax-tree/glassfish            1963   17480   22137   39617    485   263
xml/xstream+c                         112   10268   29378   39646    487   244
xml/exi-manual                        105   24260   25765   50025    337   327
json/flexjson/databind                110   22461   48224   70685    503   273
yaml/jackson/databind                 109   27934   94934  122867    505   260
json/protobuf                         220   13414  112405  125820    488   253
json/json-lib/databind                112   49175  335148  384323    485   263
xml/JAXB                              110    8856  588637  597494    719   329

Manually optimized Serializers

all flavours of manually optimized serializers. Handcoded and hardwired to exactly the benchmark's message structures.

Ser Time+Deser Time (ns)

Size, Compressed size [light] in bytes

                                   create     ser   deser   total   size  +dfl
kryo-manual                           112     772     920    1692    211   131
protostuff-manual                     112     731    1189    1921    239   150
datakernel                            116    1077     860    1937    225   133
kryo-opt                              114     873    1218    2090    209   129
wobly                                  74    1223     886    2108    251   151
wobly-compact                          75    1309     956    2265    225   139
java-manual                           112    1427    1086    2514    255   147
smile/jackson/manual                  114    1539    1740    3279    341   244
msgpack/manual                        114    1472    2019    3491    233   146
cbor/jackson/manual                   112    1493    2083    3576    386   238
json/jackson/manual                   112    1928    2488    4416    468   253
jboss-marshalling-river-ct-manual     112    2286    2492    4778    289   167
json/protostuff-manual                108    2274    2958    5233    449   233
avro-generic                          538    3329    2542    5870    221   133
avro-specific                         175    2890    3353    6242    221   133
xml/aalto-manual                      112    3390    5255    8645    653   304
jboss-marshalling-river-manual        114    2883    8905   11788    483   240
xml/woodstox-manual                   109    4552    7594   12146    653   304
json/json-smart/manual-tree           111    7960    6478   14438    495   265
json/gson/manual                      116    5329   10224   15554    468   253
bson/mongodb/manual                    98    4264   16140   20405    495   278
xml/fastinfo-manual                   106   10226   10190   20415    377   284
xml/javolution/manual                 113    8697   14162   22859    504   263
json/org.json/manual-tree             111   10635   14077   24712    485   259
json/json.simple/manual               110   10641   15294   25935    495   265
xml/xstream+c-aalto                   106    6793   19519   26312    525   273
xml/xstream+c-woodstox                108    7984   22454   30438    525   273
xml/xstream+c-fastinfo                115   12612   18577   31189    345   264
json/gson/manual-tree                 110    8717   22590   31307    485   259
json/javax-stream/glassfish           112   13948   20151   34098    468   253
json/svenson/databind                 108    6903   29317   36220    495   267
json/jsonij/manual-jpath              114   38625   22273   60898    478   258
json/argo/manual-tree                 108  113793   34647  148440    485   263

Cost of features

shows performance vs convenience of manually-selected libs.

Ser Time+Deser Time (ns)

Size, Compressed size [light] in bytes

                                   create     ser   deser   total   size  +dfl
kryo-manual                           112     772     920    1692    211   131
protostuff                            142     783    1166    1949    239   150
kryo-flat-pre                         107     917    1239    2156    212   132
fst-flat-pre                          112     864    1396    2259    251   165
protostuff-runtime                     98    1097    1401    2498    241   151
kryo-flat                             106    1192    1906    3098    268   177
fst-flat                              112    1325    1937    3262    314   204
msgpack/databind                      114    1392    2044    3436    233   146
msgpack/manual                        114    1472    2019    3491    233   146
kryo-serializer                       106    2310    2425    4734    286   188
fst                                   114    2454    3763    6217    316   203

Full data

                                   create     ser   deser   total   size  +dfl
colfer                                213     557     645    1203    237   147
kryo-manual                           112     772     920    1692    211   131
protostuff-manual                     112     731    1189    1921    239   150
datakernel                            116    1077     860    1937    225   133
protostuff                            142     783    1166    1949    239   150
protobuf/protostuff                   142     828    1124    1952    239   149
minified-json/dsl-platform             88     810    1250    2060    353   197
kryo-opt                              114     873    1218    2090    209   129
wobly                                  74    1223     886    2108    251   151
kryo-flat-pre                         107     917    1239    2156    212   132
fst-flat-pre                          112     864    1396    2259    251   165
wobly-compact                          75    1309     956    2265    225   139
protostuff-graph                      142    1074    1218    2292    239   150
json/dsl-platform                      94     948    1508    2456    485   261
protostuff-runtime                     98    1097    1401    2498    241   151
java-manual                           112    1427    1086    2514    255   147
protobuf/protostuff-runtime           112    1127    1475    2602    241   150
json/fastjson_array/databind          111    1256    1418    2674    281   163
protostuff-graph-runtime              110    1448    1596    3045    241   151
kryo-flat                             106    1192    1906    3098    268   177
fst-flat                              112    1325    1937    3262    314   204
smile/jackson/manual                  114    1539    1740    3279    341   244
msgpack/databind                      114    1392    2044    3436    233   146
protobuf                              222    2093    1361    3454    239   149
msgpack/manual                        114    1472    2019    3491    233   146
cbor/jackson/manual                   112    1493    2083    3576    386   238
flatbuffers                           107    2253    1372    3625    432   226
thrift-compact                        200    2233    1545    3778    240   148
thrift                                200    2606    1298    3903    349   197
cbor-col/jackson/databind             108    1519    2505    4024    251   165
smile-col/jackson/databind             99    1496    2550    4046    252   165
cbor/jackson+afterburner/databind     105    1702    2429    4130    397   246
smile/jackson+afterburner/databind    109    1861    2289    4150    352   252
json/jackson/manual                   112    1928    2488    4416    468   253
json/fastjson/databind                113    1986    2459    4445    486   262
json-col/jackson/databind             100    1902    2777    4679    293   178
scala/sbinary                         903    2391    2338    4730    255   147
kryo-serializer                       106    2310    2425    4734    286   188
jboss-marshalling-river-ct-manual     112    2286    2492    4778    289   167
smile/jackson/databind                113    2331    2823    5154    338   241
json/protostuff-manual                108    2274    2958    5233    449   233
json/jackson+afterburner/databind     108    2276    2972    5248    485   261
cbor/jackson/databind                 107    2205    3361    5566    397   246
json/protostuff-runtime               107    2524    3143    5667    469   243
capnproto                             108    3406    2292    5699    400   204
avro-generic                          538    3329    2542    5870    221   133
fst                                   114    2454    3763    6217    316   203
avro-specific                         175    2890    3353    6242    221   133
json/jackson/databind                 112    2802    4119    6921    485   261
json/jackson-jr/databind              108    2914    4120    7034    468   255
xml/aalto-manual                      112    3390    5255    8645    653   304
jboss-marshalling-river-ct            107    4294    4618    8912    298   199
jboss-marshalling-river-manual        114    2883    8905   11788    483   240
xml/woodstox-manual                   109    4552    7594   12146    653   304
xml/jackson/databind                  109    4990    9010   14001    683   286
json/json-smart/manual-tree           111    7960    6478   14438    495   265
json/gson/manual                      116    5329   10224   15554    468   253
hessian                               109    6783    9575   16358    501   313
bson/jackson/databind                  99    7860   10407   18266    506   286
json/gson/databind                    107    8063   11257   19319    486   259
bson/mongodb/manual                    98    4264   16140   20405    495   278
xml/fastinfo-manual                   106   10226   10190   20415    377   284
jboss-serialization                    99   10040   10753   20793    932   582
xml/javolution/manual                 113    8697   14162   22859    504   263
json/org.json/manual-tree             111   10635   14077   24712    485   259
json/json.simple/manual               110   10641   15294   25935    495   265
xml/xstream+c-aalto                   106    6793   19519   26312    525   273
xml/xstream+c-woodstox                108    7984   22454   30438    525   273
xml/xstream+c-fastinfo                115   12612   18577   31189    345   264
json/gson/manual-tree                 110    8717   22590   31307    485   259
xml/JAXB/aalto                         98    8676   23353   32029    702   318
json/javax-stream/glassfish           112   13948   20151   34098    468   253
json/svenson/databind                 108    6903   29317   36220    495   267
json/javax-tree/glassfish            1963   17480   22137   39617    485   263
xml/xstream+c                         112   10268   29378   39646    487   244
xml/exi-manual                        105   24260   25765   50025    337   327
json/jsonij/manual-jpath              114   38625   22273   60898    478   258
jboss-marshalling-river               106    6350   55779   62130    694   400
json/flexjson/databind                110   22461   48224   70685    503   273
java-built-in                         109    9090   69665   78755    889   514
java-built-in-serializer              109    9312   71857   81170    889   514
stephenerialization                   107   10765   78270   89035   1093   515
jboss-marshalling-serial              112   16035   76410   92445    856   498
yaml/jackson/databind                 109   27934   94934  122867    505   260
json/protobuf                         220   13414  112405  125820    488   253
scala/java-built-in                   768   17043  114234  131277   1293   698
json/argo/manual-tree                 108  113793   34647  148440    485   263
json/json-lib/databind                112   49175  335148  384323    485   263
xml/JAXB                              110    8856  588637  597494    719   329
                                   Effort          Format         Structure  Misc
colfer                             CLASSES_KNOWN   BIN_CROSSLANG  FLAT_TREE  [] generated code                                           
kryo-manual                        MANUAL_OPT      BINARY         FLAT_TREE  [] manually optimized                                       
protostuff-manual                  MANUAL_OPT      BINARY         FLAT_TREE  [] manual                                                   
datakernel                         MANUAL_OPT      BINARY         FLAT_TREE  [] manually optimized                                       
protostuff                         CLASSES_KNOWN   BINARY         FLAT_TREE  [] generated code                                           
protobuf/protostuff                CLASSES_KNOWN   BIN_CROSSLANG  FLAT_TREE  [] protobuf + generated code                                
minified-json/dsl-platform         CLASSES_KNOWN   JSON           FLAT_TREE  [] JSON with minified property names and without default values.
kryo-opt                           MANUAL_OPT      BINARY         FLAT_TREE  [] manually optimized                                       
wobly                              MANUAL_OPT      BINARY         FLAT_TREE  []                                                          
kryo-flat-pre                      CLASSES_KNOWN   BINARY         FLAT_TREE  [] no shared refs, preregistered classes                    
fst-flat-pre                       CLASSES_KNOWN   BINARY         FLAT_TREE  [] fst in unshared mode with preregistered classes          
wobly-compact                      MANUAL_OPT      BINARY         FLAT_TREE  []                                                          
protostuff-graph                   CLASSES_KNOWN   BINARY         FULL_GRAPH [] graph + generated code                                   
json/dsl-platform                  CLASSES_KNOWN   JSON           FLAT_TREE  [] Serializes all properties with exact names.              
protostuff-runtime                 ZERO_KNOWLEDGE  BINARY         FLAT_TREE  [] reflection                                               
java-manual                        MANUAL_OPT      BINARY         FLAT_TREE  []                                                          
protobuf/protostuff-runtime        ZERO_KNOWLEDGE  BIN_CROSSLANG  FLAT_TREE  [] protobuf + reflection                                    
json/fastjson_array/databind       ZERO_KNOWLEDGE  JSON           FLAT_TREE  []                                                          
protostuff-graph-runtime           ZERO_KNOWLEDGE  BINARY         FULL_GRAPH [] graph + reflection                                       
kryo-flat                          ZERO_KNOWLEDGE  BINARY         FLAT_TREE  [] default, no shared refs                                  
fst-flat                           ZERO_KNOWLEDGE  BINARY         FLAT_TREE  [] fst default, but unshared mode                           
smile/jackson/manual               MANUAL_OPT      BINARY         FLAT_TREE  []                                                          
msgpack/databind                   CLASSES_KNOWN   BIN_CROSSLANG  FLAT_TREE  [] uses positional (column) layout (instead of Maps std impl uses) to eliminate use of names
protobuf                           CLASSES_KNOWN   BIN_CROSSLANG  FLAT_TREE  []                                                          
msgpack/manual                     MANUAL_OPT      BIN_CROSSLANG  FLAT_TREE  [] uses positional (column) layout (instead of Maps std impl uses) to eliminate use of names
cbor/jackson/manual                MANUAL_OPT      BIN_CROSSLANG  FLAT_TREE  []                                                          
flatbuffers                        CLASSES_KNOWN   BIN_CROSSLANG  FLAT_TREE  []                                                          
thrift-compact                     CLASSES_KNOWN   BIN_CROSSLANG  FLAT_TREE  []                                                          
thrift                             CLASSES_KNOWN   BIN_CROSSLANG  FLAT_TREE  []                                                          
cbor-col/jackson/databind          ZERO_KNOWLEDGE  JSON           FLAT_TREE  [] uses positional (column) layout to eliminate use of names
smile-col/jackson/databind         ZERO_KNOWLEDGE  JSON           FLAT_TREE  [] uses positional (column) layout to eliminate use of names
cbor/jackson+afterburner/databind  ZERO_KNOWLEDGE  BINARY         FLAT_TREE  [] uses bytecode generation to reduce overhead              
smile/jackson+afterburner/databind ZERO_KNOWLEDGE  BINARY         FLAT_TREE  [] uses bytecode generation to reduce overhead              
json/jackson/manual                MANUAL_OPT      JSON           FLAT_TREE  []                                                          
json/fastjson/databind             ZERO_KNOWLEDGE  JSON           FLAT_TREE  []                                                          
json-col/jackson/databind          ZERO_KNOWLEDGE  JSON           FLAT_TREE  [] uses positional (column) layout to eliminate use of names
scala/sbinary                      MISC            MISC           UNKNOWN    [] null                                                     
kryo-serializer                    ZERO_KNOWLEDGE  BINARY         FULL_GRAPH [] default                                                  
jboss-marshalling-river-ct-manual  MANUAL_OPT      BINARY         FULL_GRAPH [] full graph preregistered classes, manual optimization    
smile/jackson/databind             ZERO_KNOWLEDGE  BINARY         FLAT_TREE  []                                                          
json/protostuff-manual             MANUAL_OPT      JSON           FLAT_TREE  [] json + manual                                            
json/jackson+afterburner/databind  ZERO_KNOWLEDGE  BINARY         FLAT_TREE  [] uses bytecode generation to reduce overhead              
cbor/jackson/databind              ZERO_KNOWLEDGE  BIN_CROSSLANG  FLAT_TREE  []                                                          
json/protostuff-runtime            ZERO_KNOWLEDGE  JSON           FLAT_TREE  [] json + reflection                                        
capnproto                          CLASSES_KNOWN   BIN_CROSSLANG  FLAT_TREE  []                                                          
avro-generic                       MANUAL_OPT      BIN_CROSSLANG  FLAT_TREE  []                                                          
fst                                ZERO_KNOWLEDGE  BINARY         FULL_GRAPH [] default: JDK serialization drop-in-replacement mode      
avro-specific                      MANUAL_OPT      BIN_CROSSLANG  UNKNOWN    []                                                          
json/jackson/databind              ZERO_KNOWLEDGE  JSON           FLAT_TREE  []                                                          
json/jackson-jr/databind           ZERO_KNOWLEDGE  JSON           FLAT_TREE  []                                                          
xml/aalto-manual                   MANUAL_OPT      XML            UNKNOWN    []                                                          
jboss-marshalling-river-ct         CLASSES_KNOWN   BINARY         FULL_GRAPH [] full graph with preregistered classes                    
jboss-marshalling-river-manual     MANUAL_OPT      BINARY         FULL_GRAPH [] full graph with manual optimizations                     
xml/woodstox-manual                MANUAL_OPT      XML            UNKNOWN    []                                                          
xml/jackson/databind               ZERO_KNOWLEDGE  XML            FLAT_TREE  []                                                          
json/json-smart/manual-tree        MANUAL_OPT      JSON           FLAT_TREE  []                                                          
json/gson/manual                   MANUAL_OPT      JSON           FLAT_TREE  []                                                          
hessian                            ZERO_KNOWLEDGE  BIN_CROSSLANG  FULL_GRAPH []                                                          
bson/jackson/databind              CLASSES_KNOWN   BIN_CROSSLANG  FLAT_TREE  []                                                          
json/gson/databind                 ZERO_KNOWLEDGE  JSON           FLAT_TREE  []                                                          
bson/mongodb/manual                MANUAL_OPT      BIN_CROSSLANG  FLAT_TREE  []                                                          
xml/fastinfo-manual                MANUAL_OPT      XML            UNKNOWN    []                                                          
jboss-serialization                ZERO_KNOWLEDGE  BINARY         FULL_GRAPH []                                                          
xml/javolution/manual              MANUAL_OPT      XML            FLAT_TREE  []                                                          
json/org.json/manual-tree          MANUAL_OPT      JSON           FLAT_TREE  []                                                          
json/json.simple/manual            MANUAL_OPT      JSON           FLAT_TREE  []                                                          
xml/xstream+c-aalto                MANUAL_OPT      XML            FLAT_TREE  []                                                          
xml/xstream+c-woodstox             MANUAL_OPT      XML            FLAT_TREE  []                                                          
xml/xstream+c-fastinfo             MANUAL_OPT      XML            FLAT_TREE  []                                                          
json/gson/manual-tree              MANUAL_OPT      JSON           FLAT_TREE  []                                                          
xml/JAXB/aalto                     CLASSES_KNOWN   XML            FULL_GRAPH []                                                          
json/javax-stream/glassfish        MANUAL_OPT      JSON           FLAT_TREE  []                                                          
json/svenson/databind              MANUAL_OPT      JSON           FLAT_TREE  []                                                          
json/javax-tree/glassfish          ZERO_KNOWLEDGE  JSON           FLAT_TREE  []                                                          
xml/xstream+c                      ZERO_KNOWLEDGE  XML            FLAT_TREE  []                                                          
xml/exi-manual                     ZERO_KNOWLEDGE  XML            UNKNOWN    []                                                          
json/jsonij/manual-jpath           MANUAL_OPT      JSON           FLAT_TREE  []                                                          
jboss-marshalling-river            ZERO_KNOWLEDGE  BINARY         FULL_GRAPH [] full graph zero knowledge                                
json/flexjson/databind             ZERO_KNOWLEDGE  JSON           FULL_GRAPH []                                                          
java-built-in                      ZERO_KNOWLEDGE  BINARY         FLAT_TREE  []                                                          
java-built-in-serializer           ZERO_KNOWLEDGE  BINARY         FULL_GRAPH []                                                          
stephenerialization                ZERO_KNOWLEDGE  BINARY         FULL_GRAPH [] null                                                     
jboss-marshalling-serial           ZERO_KNOWLEDGE  BINARY         FULL_GRAPH []                                                          
yaml/jackson/databind              ZERO_KNOWLEDGE  JSON           FULL_GRAPH []                                                          
json/protobuf                      CLASSES_KNOWN   JSON           FLAT_TREE  []                                                          
scala/java-built-in                MISC            MISC           UNKNOWN    [] null                                                     
json/argo/manual-tree              MANUAL_OPT      JSON           FLAT_TREE  []                                                          
json/json-lib/databind             ZERO_KNOWLEDGE  JSON           FLAT_TREE  []                                                          
xml/JAXB                           CLASSES_KNOWN   XML            FULL_GRAPH []                                                          
wenshao commented 8 years ago

@pascaldekloe not used code removed.

zapov commented 8 years ago

Before this gets merged I suggest changing name from json/fastjson_array/databind to something else, eg json-array/fastjson/databind

wenshao commented 8 years ago

@zapov name changed.

zapov commented 8 years ago

Looks good to me.

@pascaldekloe wenshao added another text format to the bench. Similar to Jackson -col formats where they omit attribute names from the resulting output. Not sure how useful that is (since it's brittle) but it's a valid serialization format ;)

I suggested changing the name, so that people looking at the result don't confuse it with normal json results.

wenshao commented 8 years ago

In china, fastjson more popular than gson/jackson. This document describes how to use BeanToArray https://github.com/alibaba/fastjson/wiki/BeanToArray_en

pascaldekloe commented 8 years ago

I'll update the wiki in a bit...

wenshao commented 8 years ago

thank you very much

zapov commented 8 years ago

btw. @pascaldekloe be wary of just running a single codec and updating the result. I've noticed a 10% difference when doing a standalone run and running entire bench