eishay / jvm-serializers

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

added FastJSON databind #11

Closed ProgrammerBruce closed 13 years ago

ProgrammerBruce commented 13 years ago

FastJSON claims to be faster than Jackson. http://code.alibabatech.com/wiki/display/FastJSON

ProgrammerBruce commented 13 years ago

Note this implementation "cheats" a little, in that it serializes enum ordinal values instead of enum name values. (So, "player":0 is serialized instead of "player":"JAVA".) Since, this behavior passed the correctness checks of the test suite, I went with it. Will post to user group about changing correctness checks to require enum name values.

ProgrammerBruce commented 13 years ago

Never mind my previous comment. I ran the tests again, and got different results. I think the first test runs were flawed because my machine was very busy with other activities. Committing faster FastJSON serialization implementation that also correctly serializes enum names (not the ordinals).

cowtowncoder commented 13 years ago

For what its worth, other json impls do serializaze enum names, although I agree in that in many ways both could be viewed as acceptable (and numeric one can be faster).