FsPickler


Performance

THIS PAGE IS OUTDATED:- please see the updated benchmarks page here.

How does FsPickler compare against other .Net serialization libraries in terms of performance? In this section we present a few microbenchmarks: we compared FsPickler against BinaryFormatter, NetDataContractSerializer, Json.Net 7.0, ProtoBuf-Net 2.0 and Wire 0.0.5. Code used to run the tests is available in the FsPickler.PerfTests project. Benchmarks were run on an Intel Core i7-7200K CPU @ 3.50GHz with 16GB RAM.

Last updated on October 12, 2015.

Execution Time

The first set of tests measures serialization roundtrip time and GC collections. Performance testing was done using the PerfUtil library. Libraries not appearing in charts failed to serialize the tested objects. Benchmarks are indicative and in no way scientific.

Simple POCO

ISerializable Object

DataContract Object

System.Tuple

Exception with Stacktrace

Array of Tuples

Array of System.Type

Generic Dictionary

Binary Tree

F# list of integers

F# list of tuples

3D float Array (200 x 200 x 200)

F# mutual recursive types

F# Quotation

Random object graph (n = 500, Pb = 20%)

Serialization Size

The second set of tests compare the size (in bytes) of serialized objects. Libraries not appearing in charts failed to serialize the tested objects.

System.Integer

System.Tuple

Integer Array (10^6 elements)

Pair Array (10000 elements)

3D float Array (100x100x100)

F# List of Integers (1000 elements)

F# List of Pairs (1000 elements)

Simple POCO

Dictionary of POCOs (1000 entries)

Exception (with stacktrace)

Binary tree (balanced, depth = 10)

F# Quotation

Fork me on GitHub