Test Platform

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

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
protostuff                            147     803    1168    1971    239   150
minified-json/dsl-platform             90     803    1366    2169    353   197
kryo-flat-pre                         109    1062    1275    2337    212   132
fst-flat-pre                          116     975    1472    2447    251   165
json/dsl-platform                      90    1109    1653    2762    485   261
protobuf                              241    2143    1262    3405    239   149
msgpack/databind                      113    1564    2047    3610    233   146
flatbuffers                           117    2328    1308    3635    432   226
smile-col/jackson/databind            118    1644    2314    3959    252   165
thrift-compact                        197    2585    1469    4054    240   148
cbor/jackson+afterburner/databind     120    1710    2424    4134    397   246
cbor-col/jackson/databind             117    1760    2439    4198    251   165
thrift                                233    2759    1447    4206    349   197
smile/jackson+afterburner/databind    116    1964    2320    4284    352   252
json/fastjson/databind                117    2518    2142    4660    486   262
scala/sbinary                         766    2569    2318    4887    255   147
json-col/jackson/databind             110    2041    3000    5041    293   178
smile/jackson/databind                118    2468    2920    5388    338   241
json/jackson+afterburner/databind     113    2297    3093    5390    485   261
cbor/jackson/databind                 113    2419    3295    5713    397   246
json/protostuff-runtime               114    2860    3346    6206    469   243
capnproto                             119    4617    1630    6247    400   204
json/jackson/databind                 122    2576    4070    6647    485   261
json/jackson-jr/databind              118    2937    4079    7016    468   255
xml/jackson/databind                  118    5180    8660   13840    683   286
json/gson/databind                    118    8047    9055   17103    486   259
bson/jackson/databind                 119   11740    9873   21613    506   286
xml/xstream+c                         110   10388   30546   40934    487   244
xml/exi-manual                        117   23235   20869   44104    337   327
json/javax-tree/glassfish            2381   19161   27454   46615    485   263
java-built-in                         108   10306   50074   60379    889   514
scala/java-built-in                   694   17521   74578   92099   1293   698
json/protobuf                         235   13576   91787  105363    488   253
json/json-lib/databind                116   49103  154169  203271    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                      153    1119    1293    2412    239   150
protostuff-graph-runtime              115    1376    1451    2827    241   151
kryo-serializer                       108    2658    2662    5320    286   188
fst                                   114    3150    2999    6148    316   203
jboss-marshalling-river-ct            117    4134    3302    7436    298   199
hessian                               119    6272    8877   15150    501   313
jboss-serialization                   119   12057   11764   23820    932   582
xml/JAXB/aalto                        118    9289   19547   28837    702   318
jboss-marshalling-river               109    6351   36342   42692    694   400
jboss-marshalling-serial              117   14811   42601   57412    856   498
java-built-in-serializer              119   10769   47274   58043    889   514
json/flexjson/databind                115   21653   37975   59628    503   273
stephenerialization                   136   12387   47768   60155   1093   515
yaml/jackson/databind                 119   29910   63538   93448    505   260
xml/JAXB                              117    9235  314452  323688    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
protobuf/protostuff                   160     868    1169    2037    239   149
protobuf/protostuff-runtime           119    1067    1320    2387    241   150
protobuf                              241    2143    1262    3405    239   149
msgpack/databind                      113    1564    2047    3610    233   146
flatbuffers                           117    2328    1308    3635    432   226
thrift-compact                        197    2585    1469    4054    240   148
thrift                                233    2759    1447    4206    349   197
cbor/jackson/databind                 113    2419    3295    5713    397   246
capnproto                             119    4617    1630    6247    400   204
hessian                               119    6272    8877   15150    501   313
bson/jackson/databind                 119   11740    9873   21613    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             90     803    1366    2169    353   197
json/dsl-platform                      90    1109    1653    2762    485   261
smile-col/jackson/databind            118    1644    2314    3959    252   165
cbor-col/jackson/databind             117    1760    2439    4198    251   165
json/fastjson/databind                117    2518    2142    4660    486   262
json-col/jackson/databind             110    2041    3000    5041    293   178
json/protostuff-runtime               114    2860    3346    6206    469   243
json/jackson/databind                 122    2576    4070    6647    485   261
json/jackson-jr/databind              118    2937    4079    7016    468   255
xml/jackson/databind                  118    5180    8660   13840    683   286
json/gson/databind                    118    8047    9055   17103    486   259
xml/JAXB/aalto                        118    9289   19547   28837    702   318
xml/xstream+c                         110   10388   30546   40934    487   244
xml/exi-manual                        117   23235   20869   44104    337   327
json/javax-tree/glassfish            2381   19161   27454   46615    485   263
json/flexjson/databind                115   21653   37975   59628    503   273
yaml/jackson/databind                 119   29910   63538   93448    505   260
json/protobuf                         235   13576   91787  105363    488   253
json/json-lib/databind                116   49103  154169  203271    485   263
xml/JAXB                              117    9235  314452  323688    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                           117     853    1027    1881    211   131
protostuff-manual                     120     734    1172    1906    239   150
wobly                                  66    1234     888    2122    251   151
wobly-compact                          81    1278     961    2239    225   139
kryo-opt                              117    1030    1260    2290    209   129
java-manual                           119    1524    1189    2713    255   147
msgpack/manual                        118    1467    1948    3416    233   146
smile/jackson/manual                  115    1703    1791    3494    341   244
cbor/jackson/manual                   109    1685    2005    3690    386   238
jboss-marshalling-river-ct-manual     117    2025    1771    3796    289   167
json/jackson/manual                   115    2097    2454    4550    468   253
avro-generic                          563    3060    2002    5061    221   133
avro-specific                         159    2728    2489    5217    221   133
json/protostuff-manual                119    2591    3070    5660    449   233
xml/aalto-manual                      116    3386    5104    8491    653   304
jboss-marshalling-river-manual        114    2659    7246    9905    483   240
xml/woodstox-manual                   109    5224    6979   12203    653   304
json/gson/manual                      118    5723    7703   13426    468   253
json/json-smart/manual-tree           119   10163    6686   16849    495   265
xml/javolution/manual                 113    6941   11694   18635    504   263
xml/fastinfo-manual                   116   10848    9348   20196    377   284
json/gson/manual-tree                 118    9552   12122   21675    485   259
xml/xstream+c-aalto                   119    6446   15302   21747    525   273
xml/xstream+c-fastinfo                116   12321   13268   25589    345   264
json/org.json/manual-tree             120   10708   14930   25637    485   259
bson/mongodb/manual                   119    4976   22272   27248    495   278
xml/xstream+c-woodstox                115    8383   18993   27377    525   273
json/json.simple/manual               121   12306   15732   28038    495   265
json/svenson/databind                 118    7858   21021   28879    495   267
json/javax-stream/glassfish           114   14273   24158   38430    468   253
json/jsonij/manual-jpath              113   42829   18783   61612    478   262
json/argo/manual-tree                 117  108496   27525  136022    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                           117     853    1027    1881    211   131
protostuff                            147     803    1168    1971    239   150
kryo-flat-pre                         109    1062    1275    2337    212   132
protostuff-runtime                    118    1000    1426    2427    241   151
fst-flat-pre                          116     975    1472    2447    251   165
kryo-flat                             115    1447    1895    3342    268   177
msgpack/manual                        118    1467    1948    3416    233   146
msgpack/databind                      113    1564    2047    3610    233   146
fst-flat                              115    1475    2208    3684    314   204
kryo-serializer                       108    2658    2662    5320    286   188
fst                                   114    3150    2999    6148    316   203

Full data

                                   create     ser   deser   total   size  +dfl
kryo-manual                           117     853    1027    1881    211   131
protostuff-manual                     120     734    1172    1906    239   150
protostuff                            147     803    1168    1971    239   150
protobuf/protostuff                   160     868    1169    2037    239   149
wobly                                  66    1234     888    2122    251   151
minified-json/dsl-platform             90     803    1366    2169    353   197
wobly-compact                          81    1278     961    2239    225   139
kryo-opt                              117    1030    1260    2290    209   129
kryo-flat-pre                         109    1062    1275    2337    212   132
protobuf/protostuff-runtime           119    1067    1320    2387    241   150
protostuff-graph                      153    1119    1293    2412    239   150
protostuff-runtime                    118    1000    1426    2427    241   151
fst-flat-pre                          116     975    1472    2447    251   165
java-manual                           119    1524    1189    2713    255   147
json/dsl-platform                      90    1109    1653    2762    485   261
protostuff-graph-runtime              115    1376    1451    2827    241   151
kryo-flat                             115    1447    1895    3342    268   177
protobuf                              241    2143    1262    3405    239   149
msgpack/manual                        118    1467    1948    3416    233   146
smile/jackson/manual                  115    1703    1791    3494    341   244
msgpack/databind                      113    1564    2047    3610    233   146
flatbuffers                           117    2328    1308    3635    432   226
fst-flat                              115    1475    2208    3684    314   204
cbor/jackson/manual                   109    1685    2005    3690    386   238
jboss-marshalling-river-ct-manual     117    2025    1771    3796    289   167
smile-col/jackson/databind            118    1644    2314    3959    252   165
thrift-compact                        197    2585    1469    4054    240   148
cbor/jackson+afterburner/databind     120    1710    2424    4134    397   246
cbor-col/jackson/databind             117    1760    2439    4198    251   165
thrift                                233    2759    1447    4206    349   197
smile/jackson+afterburner/databind    116    1964    2320    4284    352   252
json/jackson/manual                   115    2097    2454    4550    468   253
json/fastjson/databind                117    2518    2142    4660    486   262
scala/sbinary                         766    2569    2318    4887    255   147
json-col/jackson/databind             110    2041    3000    5041    293   178
avro-generic                          563    3060    2002    5061    221   133
avro-specific                         159    2728    2489    5217    221   133
kryo-serializer                       108    2658    2662    5320    286   188
smile/jackson/databind                118    2468    2920    5388    338   241
json/jackson+afterburner/databind     113    2297    3093    5390    485   261
json/protostuff-manual                119    2591    3070    5660    449   233
cbor/jackson/databind                 113    2419    3295    5713    397   246
fst                                   114    3150    2999    6148    316   203
json/protostuff-runtime               114    2860    3346    6206    469   243
capnproto                             119    4617    1630    6247    400   204
json/jackson/databind                 122    2576    4070    6647    485   261
json/jackson-jr/databind              118    2937    4079    7016    468   255
jboss-marshalling-river-ct            117    4134    3302    7436    298   199
xml/aalto-manual                      116    3386    5104    8491    653   304
jboss-marshalling-river-manual        114    2659    7246    9905    483   240
xml/woodstox-manual                   109    5224    6979   12203    653   304
json/gson/manual                      118    5723    7703   13426    468   253
xml/jackson/databind                  118    5180    8660   13840    683   286
hessian                               119    6272    8877   15150    501   313
json/json-smart/manual-tree           119   10163    6686   16849    495   265
json/gson/databind                    118    8047    9055   17103    486   259
xml/javolution/manual                 113    6941   11694   18635    504   263
xml/fastinfo-manual                   116   10848    9348   20196    377   284
bson/jackson/databind                 119   11740    9873   21613    506   286
json/gson/manual-tree                 118    9552   12122   21675    485   259
xml/xstream+c-aalto                   119    6446   15302   21747    525   273
jboss-serialization                   119   12057   11764   23820    932   582
xml/xstream+c-fastinfo                116   12321   13268   25589    345   264
json/org.json/manual-tree             120   10708   14930   25637    485   259
bson/mongodb/manual                   119    4976   22272   27248    495   278
xml/xstream+c-woodstox                115    8383   18993   27377    525   273
json/json.simple/manual               121   12306   15732   28038    495   265
xml/JAXB/aalto                        118    9289   19547   28837    702   318
json/svenson/databind                 118    7858   21021   28879    495   267
json/javax-stream/glassfish           114   14273   24158   38430    468   253
xml/xstream+c                         110   10388   30546   40934    487   244
jboss-marshalling-river               109    6351   36342   42692    694   400
xml/exi-manual                        117   23235   20869   44104    337   327
json/javax-tree/glassfish            2381   19161   27454   46615    485   263
jboss-marshalling-serial              117   14811   42601   57412    856   498
java-built-in-serializer              119   10769   47274   58043    889   514
json/flexjson/databind                115   21653   37975   59628    503   273
stephenerialization                   136   12387   47768   60155   1093   515
java-built-in                         108   10306   50074   60379    889   514
json/jsonij/manual-jpath              113   42829   18783   61612    478   262
scala/java-built-in                   694   17521   74578   92099   1293   698
yaml/jackson/databind                 119   29910   63538   93448    505   260
json/protobuf                         235   13576   91787  105363    488   253
json/argo/manual-tree                 117  108496   27525  136022    485   263
json/json-lib/databind                116   49103  154169  203271    485   263
xml/JAXB                              117    9235  314452  323688    719   329
                                   Effort          Format         Structure  Misc
kryo-manual                        MANUAL_OPT      BINARY         FLAT_TREE  [] manually optimized                                       
protostuff-manual                  MANUAL_OPT      BINARY         FLAT_TREE  [] manual                                                   
protostuff                         CLASSES_KNOWN   BINARY         FLAT_TREE  [] generated code                                           
protobuf/protostuff                CLASSES_KNOWN   BIN_CROSSLANG  FLAT_TREE  [] protobuf + generated code                                
wobly                              MANUAL_OPT      BINARY         FLAT_TREE  []                                                          
minified-json/dsl-platform         CLASSES_KNOWN   JSON           FLAT_TREE  [] JSON with minified property names and without default values.
wobly-compact                      MANUAL_OPT      BINARY         FLAT_TREE  []                                                          
kryo-opt                           MANUAL_OPT      BINARY         FLAT_TREE  [] manually optimized                                       
kryo-flat-pre                      CLASSES_KNOWN   BINARY         FLAT_TREE  [] no shared refs, preregistered classes                    
protobuf/protostuff-runtime        ZERO_KNOWLEDGE  BIN_CROSSLANG  FLAT_TREE  [] protobuf + reflection                                    
protostuff-graph                   CLASSES_KNOWN   BINARY         FULL_GRAPH [] graph + generated code                                   
protostuff-runtime                 ZERO_KNOWLEDGE  BINARY         FLAT_TREE  [] reflection                                               
fst-flat-pre                       CLASSES_KNOWN   BINARY         FLAT_TREE  [] fst in unshared mode with preregistered classes          
java-manual                        MANUAL_OPT      BINARY         FLAT_TREE  []                                                          
json/dsl-platform                  CLASSES_KNOWN   JSON           FLAT_TREE  [] Serializes all properties with exact names.              
protostuff-graph-runtime           ZERO_KNOWLEDGE  BINARY         FULL_GRAPH [] graph + reflection                                       
kryo-flat                          ZERO_KNOWLEDGE  BINARY         FLAT_TREE  [] default, no shared refs                                  
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
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
flatbuffers                        CLASSES_KNOWN   BIN_CROSSLANG  FLAT_TREE  []                                                          
fst-flat                           ZERO_KNOWLEDGE  BINARY         FLAT_TREE  [] fst default, but unshared mode                           
cbor/jackson/manual                MANUAL_OPT      BIN_CROSSLANG  FLAT_TREE  []                                                          
jboss-marshalling-river-ct-manual  MANUAL_OPT      BINARY         FULL_GRAPH [] full graph preregistered classes, manual optimization    
smile-col/jackson/databind         ZERO_KNOWLEDGE  JSON           FLAT_TREE  [] uses positional (column) layout to eliminate use of names
thrift-compact                     CLASSES_KNOWN   BIN_CROSSLANG  FLAT_TREE  []                                                          
cbor/jackson+afterburner/databind  ZERO_KNOWLEDGE  BINARY         FLAT_TREE  [] uses bytecode generation to reduce overhead              
cbor-col/jackson/databind          ZERO_KNOWLEDGE  JSON           FLAT_TREE  [] uses positional (column) layout to eliminate use of names
thrift                             CLASSES_KNOWN   BIN_CROSSLANG  FLAT_TREE  []                                                          
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  []                                                          
scala/sbinary                      MISC            MISC           UNKNOWN    [] null                                                     
json-col/jackson/databind          ZERO_KNOWLEDGE  JSON           FLAT_TREE  [] uses positional (column) layout to eliminate use of names
avro-generic                       MANUAL_OPT      BIN_CROSSLANG  FLAT_TREE  []                                                          
avro-specific                      MANUAL_OPT      BIN_CROSSLANG  UNKNOWN    []                                                          
kryo-serializer                    ZERO_KNOWLEDGE  BINARY         FULL_GRAPH [] default                                                  
smile/jackson/databind             ZERO_KNOWLEDGE  BINARY         FLAT_TREE  []                                                          
json/jackson+afterburner/databind  ZERO_KNOWLEDGE  BINARY         FLAT_TREE  [] uses bytecode generation to reduce overhead              
json/protostuff-manual             MANUAL_OPT      JSON           FLAT_TREE  [] json + manual                                            
cbor/jackson/databind              ZERO_KNOWLEDGE  BIN_CROSSLANG  FLAT_TREE  []                                                          
fst                                ZERO_KNOWLEDGE  BINARY         FULL_GRAPH [] default: JDK serialization drop-in-replacement mode      
json/protostuff-runtime            ZERO_KNOWLEDGE  JSON           FLAT_TREE  [] json + reflection                                        
capnproto                          CLASSES_KNOWN   BIN_CROSSLANG  FLAT_TREE  []                                                          
json/jackson/databind              ZERO_KNOWLEDGE  JSON           FLAT_TREE  []                                                          
json/jackson-jr/databind           ZERO_KNOWLEDGE  JSON           FLAT_TREE  []                                                          
jboss-marshalling-river-ct         CLASSES_KNOWN   BINARY         FULL_GRAPH [] full graph with preregistered classes                    
xml/aalto-manual                   MANUAL_OPT      XML            UNKNOWN    []                                                          
jboss-marshalling-river-manual     MANUAL_OPT      BINARY         FULL_GRAPH [] full graph with manual optimizations                     
xml/woodstox-manual                MANUAL_OPT      XML            UNKNOWN    []                                                          
json/gson/manual                   MANUAL_OPT      JSON           FLAT_TREE  []                                                          
xml/jackson/databind               ZERO_KNOWLEDGE  XML            FLAT_TREE  []                                                          
hessian                            ZERO_KNOWLEDGE  BIN_CROSSLANG  FULL_GRAPH []                                                          
json/json-smart/manual-tree        MANUAL_OPT      JSON           FLAT_TREE  []                                                          
json/gson/databind                 ZERO_KNOWLEDGE  JSON           FLAT_TREE  []                                                          
xml/javolution/manual              MANUAL_OPT      XML            FLAT_TREE  []                                                          
xml/fastinfo-manual                MANUAL_OPT      XML            UNKNOWN    []                                                          
bson/jackson/databind              CLASSES_KNOWN   BIN_CROSSLANG  FLAT_TREE  []                                                          
json/gson/manual-tree              MANUAL_OPT      JSON           FLAT_TREE  []                                                          
xml/xstream+c-aalto                MANUAL_OPT      XML            FLAT_TREE  []                                                          
jboss-serialization                ZERO_KNOWLEDGE  BINARY         FULL_GRAPH []                                                          
xml/xstream+c-fastinfo             MANUAL_OPT      XML            FLAT_TREE  []                                                          
json/org.json/manual-tree          MANUAL_OPT      JSON           FLAT_TREE  []                                                          
bson/mongodb/manual                MANUAL_OPT      BIN_CROSSLANG  FLAT_TREE  []                                                          
xml/xstream+c-woodstox             MANUAL_OPT      XML            FLAT_TREE  []                                                          
json/json.simple/manual            MANUAL_OPT      JSON           FLAT_TREE  []                                                          
xml/JAXB/aalto                     CLASSES_KNOWN   XML            FULL_GRAPH []                                                          
json/svenson/databind              MANUAL_OPT      JSON           FLAT_TREE  []                                                          
json/javax-stream/glassfish        MANUAL_OPT      JSON           FLAT_TREE  []                                                          
xml/xstream+c                      ZERO_KNOWLEDGE  XML            FLAT_TREE  []                                                          
jboss-marshalling-river            ZERO_KNOWLEDGE  BINARY         FULL_GRAPH [] full graph zero knowledge                                
xml/exi-manual                     ZERO_KNOWLEDGE  XML            UNKNOWN    []                                                          
json/javax-tree/glassfish          ZERO_KNOWLEDGE  JSON           FLAT_TREE  []                                                          
jboss-marshalling-serial           ZERO_KNOWLEDGE  BINARY         FULL_GRAPH []                                                          
java-built-in-serializer           ZERO_KNOWLEDGE  BINARY         FULL_GRAPH []                                                          
json/flexjson/databind             ZERO_KNOWLEDGE  JSON           FULL_GRAPH []                                                          
stephenerialization                ZERO_KNOWLEDGE  BINARY         FULL_GRAPH [] null                                                     
java-built-in                      ZERO_KNOWLEDGE  BINARY         FLAT_TREE  []                                                          
json/jsonij/manual-jpath           MANUAL_OPT      JSON           FLAT_TREE  []                                                          
scala/java-built-in                MISC            MISC           UNKNOWN    [] null                                                     
yaml/jackson/databind              ZERO_KNOWLEDGE  JSON           FULL_GRAPH []                                                          
json/protobuf                      CLASSES_KNOWN   JSON           FLAT_TREE  []                                                          
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 []