In the recent process of redis encapsulation, it is necessary to use serialization for data transmission, simply to take out a variety of serialization schemes to make a comparison.
There are two uses of serialization:
1) Permanently save the byte sequence of the object on the hard disk
2) The byte sequence of the transmitted object on the network
Scenario: The process of serializing and deserializing by simulating a common Pojo class
Cycle 10 million times per case
Simulations of different versions of the JDK
Serialization Scenarios:
1.fst
2.jdk
3.kryo
4.hession
5.protostuff
6.jackson
7.fastjson
Test results:
Summarize:
1.java version upgrade to 1.8 after the same JDK serialization itself performance improvement is still quite good
The 2.protostuff serialized artifact, in addition to Kryo, was far more than its serialization way
3.hession serialization performance should be beyond the JDK. But the test results are not the same, so far no problem has been found.
Technology Exchange: 534368042
Java various serialization performance tests