Skip to main content

Benchmarks

These benchmarks are non-scientific, and are measured in uncontrolled environments.

Their goal is to ensure that the performance of cavro is adequate compared to other offerings, and to highlight any performance regressions early.

Each test is run 3 times for each library under test, and the results collected. Graphs show the fastest run time.

Most Recent Run​

  • Commit Hash: 6cc6b55cc9a08bd43969c3ae64d20a6d474bb52c
  • Run time: 2026-07-29 12:00:29.640706062

complex_schema​

info

Measure the time taken to decode and re-encode 1,000 values, randomly generated to match a 70 kb schema

History​

Last Run Results​

libmin (s)normalized (avro=1)timings (s)
avro1.171411.1892, 1.1714, 1.1768
avro_compat0.2250.19210.2263, 0.2250, 0.2319
cavro0.08140.06950.0815, 0.0821, 0.0814
fastavro1.53031.30641.5303, 1.5335, 1.5532
fastavro_compat0.22540.19240.2254, 0.2307, 0.2318

many_numbers_decode​

info

Given a large, single array of long values encoded in the avro binary format, measure the time taken to decode them into python ints.

History​

Last Run Results​

libmin (s)normalized (avro=1)timings (s)
avro0.197510.2009, 0.2004, 0.1975
avro_compat0.03230.16330.0336, 0.0323, 0.0326
cavro0.00680.03440.0082, 0.0068, 0.0076
fastavro0.03180.16110.0351, 0.0344, 0.0318
fastavro_compat0.03090.15660.0321, 0.0318, 0.0309

many_numbers_encode​

info

Given a large, single array of long values, measure the time taken to encode them in the avro binary format

History​

Last Run Results​

libmin (s)normalized (avro=1)timings (s)
avro0.325510.3349, 0.3255, 0.3351
avro_compat0.13310.40880.1331, 0.1333, 0.1335
cavro0.01440.04430.0148, 0.0145, 0.0144
fastavro0.01970.06060.0198, 0.0198, 0.0197
fastavro_compat0.12770.39240.1278, 0.1335, 0.1277

pypi_file​

info

Measure the time taken to read all records from one file (11 Mb) of pypi download logs, sourced from google bigquery public dataset

History​

Last Run Results​

libmin (s)normalized (avro=1)timings (s)
avro2.505812.5186, 2.5101, 2.5058
avro_compat0.18370.07330.1840, 0.1864, 0.1837
cavro0.19840.07920.1999, 0.2026, 0.1984
fastavro0.51970.20740.5252, 0.5257, 0.5197
fastavro_compat0.17970.07170.1830, 0.1820, 0.1797

schema_promotion​

info

Measure the time taken to decode 1,000 values, randomly generated to match a 70 kb schema, using different reader/writer schemas.

History​

Last Run Results​

libmin (s)normalized (avro=1)timings (s)
avro0.462410.5149, 0.4693, 0.4624
avro_compat0.13540.29280.1356, 0.1354, 0.1519
cavro0.120.25940.1209, 0.1200, 0.1233
fastavro1.39823.02371.3982, 1.4393, 1.4223
fastavro_compat0.13170.28490.1356, 0.1317, 0.1339

schema_promotion_container​

info

Measure the time taken to decode 1,000 values from an object container, randomly generated to match a 70 kb schema, using different reader/writer schemas.

History​

Last Run Results​

libmin (s)normalized (avro=1)timings (s)
avro0.416110.4241, 0.4211, 0.4161
avro_compat0.03780.09080.0415, 0.0415, 0.0378
cavro0.11240.27030.1124, 0.1216, 0.1128
fastavro0.18910.45450.1954, 0.1920, 0.1891
fastavro_compat0.11350.27290.1147, 0.2610, 0.1135

simple_record_decode​

info

Measure the time taken to decode 100,000 binary-encoded records using the simple schema, to each library's native record format

History​

Last Run Results​

libmin (s)normalized (avro=1)timings (s)
avro0.458910.4639, 0.4589, 0.4655
avro_compat0.11520.25120.1152, 0.1154, 0.1155
cavro0.06870.14980.0708, 0.0688, 0.0687
fastavro0.12680.27630.1268, 0.1272, 0.1294
fastavro_compat0.1250.27250.1260, 0.1250, 0.1264

simple_record_decode_dict​

info

Measure the time taken to decode 100,000 binary-encoded records using the simple schema, to a dict

History​

Last Run Results​

libmin (s)normalized (avro=1)timings (s)
avro0.457210.4596, 0.4572, 0.4586
avro_compat0.11460.25070.1148, 0.1146, 0.1166
cavro0.08620.18860.0870, 0.0871, 0.0862
fastavro0.12740.27860.1317, 0.1292, 0.1274
fastavro_compat0.12570.27480.1286, 0.1257, 0.1259

simple_record_encode​

info

Measure the time taken to encode 100,000 records using a simple (3 field) record schema. This takes advantage of cavro's class-based record types

History​

Last Run Results​

libmin (s)normalized (avro=1)timings (s)
avro0.647410.6541, 0.6474, 0.6677
avro_compat0.27030.41740.2816, 0.2703, 0.2703
cavro0.19420.30.1983, 0.1955, 0.1942
fastavro0.15670.2420.1567, 0.1600, 0.1584
fastavro_compat0.28370.43810.2894, 0.2837, 0.2905

simple_record_encode_dict​

info

Measure the time taken to encode 100,000 dicts using a simple (3 field) record schema.

History​

Last Run Results​

libmin (s)normalized (avro=1)timings (s)
avro0.651410.6534, 0.6514, 0.6596
avro_compat0.27870.42790.2787, 0.2827, 0.2788
cavro0.10120.15530.1020, 0.1012, 0.1025
fastavro0.15450.23720.1582, 0.1550, 0.1545
fastavro_compat0.28050.43060.2932, 0.2805, 0.2902