Performance and benchmarks

To ensure that changes to Chr.Avro don’t introduce major performance regressions (and to highlight areas where performance could be improved), we maintain a set of rudimentary benchmarks to test serialization throughput.

Each benchmark runs five times, and we take the average time of those runs. These results were collected on a 2017 MacBook Pro (3.1 GHz Intel Core i5):

BenchmarkAverage time (ms)
Chr.AvroConfluent.Apache.Avro
boolean
deserialization
10,000,000 iterations
66.970204.664
serialization
10,000,000 iterations
113.6721007.223
double
deserialization
10,000,000 iterations
303.675436.088
serialization
10,000,000 iterations
375.8561385.805
float
deserialization
10,000,000 iterations
245.849454.685
serialization
10,000,000 iterations
318.8581257.844
int
deserialization
10,000,000 iterations
167.990379.699
serialization
10,000,000 iterations
253.8541204.909
long
deserialization
10,000,000 iterations
238.436537.021
serialization
10,000,000 iterations
379.1551115.019
record
deserialization
1,000,000 iterations
187.314n/a
serialization
1,000,000 iterations
669.371n/a
record (generic)
deserialization
1,000,000 iterations
n/a769.342
serialization
1,000,000 iterations
n/a636.208
record (specific)
deserialization
1,000,000 iterations
n/a409.978
serialization
1,000,000 iterations
n/a592.802
string
deserialization
10,000,000 iterations
953.264945.990
serialization
10,000,000 iterations
1895.1662144.516

In the future, we’re hoping to expand the benchmarks to test more complex situations as well as non-.NET libraries.

Chr.Avro
Toggle navigation