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: 8335809da7257c46bc731db2d004a69bfe2e5a64
  • Run time: 2023-10-17 14:33:31.823424512

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)
avro2.440812.4408, 2.4587, 2.5137
avro_compat0.68210.27940.6832, 0.6934, 0.6821
cavro0.2020.08270.2028, 0.2020, 0.2840
fastavro5.03182.06155.0947, 5.0318, 5.0344
fastavro_compat0.68190.27940.7351, 0.6819, 0.6821

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.364910.3661, 0.3670, 0.3649
avro_compat0.13470.3690.1347, 0.1349, 0.1358
cavro0.00980.02690.0098, 0.0102, 0.0116
fastavro0.13750.37680.1404, 0.1375, 0.1418
fastavro_compat0.1350.37010.1354, 0.1355, 0.1350

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.743710.7437, 0.7513, 0.7451
avro_compat0.45030.60550.4562, 0.4503, 0.4520
cavro0.03170.04260.0323, 0.0317, 0.0324
fastavro0.03610.04860.0361, 0.0363, 0.0363
fastavro_compat0.45030.60550.4532, 0.4512, 0.4503

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)
avro5.817715.8177, 5.8736, 5.8367
avro_compat0.60760.10440.6076, 0.6107, 0.6079
cavro0.63520.10920.6352, 0.6451, 0.6423
fastavro1.97240.3391.9728, 1.9724, 1.9908
fastavro_compat0.60430.10390.6043, 0.6086, 0.6106

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.871310.8804, 0.8713, 0.8735
avro_compat0.33680.38660.3370, 0.3368, 0.3370
cavro0.25540.29310.2577, 0.2625, 0.2554
fastavro40.315146.267840.3151, 40.7424, 40.7558
fastavro_compat0.32240.37010.3246, 0.3272, 0.3224

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.887610.8876, 0.8925, 0.8942
avro_compat0.09180.10340.0918, 0.0939, 0.1746
cavro0.25820.29090.3371, 0.2684, 0.2582
fastavro35.281939.748335.2819, 35.8722, 35.8195
fastavro_compat0.25160.28340.2525, 0.2516, 0.3471

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.880310.8803, 0.8944, 0.8956
avro_compat0.41930.47640.4193, 0.4213, 0.4296
cavro0.18880.21450.1888, 0.1909, 0.1907
fastavro0.40630.46160.4137, 0.4086, 0.4063
fastavro_compat0.40650.46180.4129, 0.4065, 0.4075

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.871310.8713, 0.8803, 0.8874
avro_compat0.41330.47440.4145, 0.4293, 0.4133
cavro0.22550.25880.2255, 0.2353, 0.2266
fastavro0.41180.47260.4153, 0.4166, 0.4118
fastavro_compat0.40140.46070.4014, 0.4125, 0.4175

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)
avro1.358611.3586, 1.3849, 1.3648
avro_compat0.81410.59920.8223, 0.8421, 0.8141
cavro0.44390.32680.4439, 0.4501, 0.4469
fastavro0.36060.26550.3609, 0.3606, 0.3668
fastavro_compat0.81450.59950.8212, 0.8174, 0.8145

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)
avro1.359111.3782, 1.3591, 1.3841
avro_compat0.81380.59880.8227, 0.8138, 0.8341
cavro0.23210.17070.2368, 0.2451, 0.2321
fastavro0.35960.26460.3596, 0.3705, 0.3632
fastavro_compat0.81640.60070.8164, 0.8261, 0.8458