This is a creation in Article, where the information may have evolved or changed. Simulation test 1,000, 000 data per 10 bytes or less than 10M of data (highly structured data)
Process
1. Object serialized to Byte
2.byte reverse order As Object
3.gzip Compressed byte
Test language Go
Test scenario: Raw Byte,json, Bson, Msgpack (Protostuff need to do the object configuration file, more cumbersome, usually think and msgpack performance equivalent)
Result: Msgpack wins
|
Size
|
Gzip size after compression
|
object to byte time consuming
|
Byte-to-object time-consuming
|
Raw |
10000000
|
6573252 (65%) |
Not tested
|
Not tested |
Json
|
47515988 |
7919511 (17%) |
3248ms |
5280ms |
Bson
|
49888910 |
9506965 (19%)
|
3863ms |
6235ms |
Msgpack
|
29934223 |
7448484 |
2046ms |
3113ms |
Raw data:1000000
Raw data gzip compress:6573252//gzip size after compression
start:1000000
Marshal cost:3248//json Serialization Time-consuming
JSON string:47515988
JSON byte:47515988//binary array size
Unmarshal cost:5280//json deserialization time-consuming
Test data: {1 100 0.9405091}
JSON gzip compress:7919511//gzip size after compression
Start
Marshal cost:3863
Bson byte:49888910
Unmarshal cost:6235
Test data: {1 100 0.9405091}
Bson gzip compress:9506965
start:1000000
Marshal cost:2046
msgpack:29934223
Unmarshal cost:3113
Test data: {1 100 0.9405091}
Msgpack gzip compress:7448484