Avatar for the MarshalX user
MarshalX
python-libipld
BlogDocsChangelog

Optimize DAG-CBOR encode/decode and CAR block parsing

#104Merged
Comparing
optimize-encode-decode
(
341f165
) with
main
(
2163f07
)
CodSpeed Performance Gauge
+18%
Improvement
31
Regression
1
Untouched
160

Benchmarks

192 total
test_dag_cbor_encode[roundtrip23.json]
pytests/test_dag_cbor.py
CodSpeed Performance Gauge
+13%
14.2 µs12.6 µs
test_dag_cbor_encode[roundtrip19.json]
pytests/test_dag_cbor.py
CodSpeed Performance Gauge
+13%
15.1 µs13.4 µs
test_dag_cbor_encode[roundtrip18.json]
pytests/test_dag_cbor.py
CodSpeed Performance Gauge
+12%
15.1 µs13.5 µs
test_dag_cbor_encode[roundtrip14.json]
pytests/test_dag_cbor.py
CodSpeed Performance Gauge
+12%
15.7 µs14 µs
test_dag_cbor_encode[roundtrip24.json]
pytests/test_dag_cbor.py
CodSpeed Performance Gauge
+12%
14.6 µs13.1 µs
test_dag_cbor_encode[roundtrip13.json]
pytests/test_dag_cbor.py
CodSpeed Performance Gauge
+11%
15.1 µs13.6 µs
test_dag_cbor_encode[roundtrip16.json]
pytests/test_dag_cbor.py
CodSpeed Performance Gauge
+10%
18 µs16.3 µs
test_dag_cbor_decode_fixtures[cid-mapof]
pytests/test_dag_cbor.py
CodSpeed Performance Gauge
+7%
29.4 µs27.5 µs
test_dag_cbor_decode_fixtures[dagpb_11unnamedlinks+data]
pytests/test_dag_cbor.py
CodSpeed Performance Gauge
-5%
33.1 µs34.9 µs
test_dag_cbor_decode_fixtures[garbage-20]
pytests/test_dag_cbor.py
CodSpeed Performance Gauge
+5%
41 µs39.2 µs
test_dag_cbor_decode_torture_cids
pytests/test_dag_cbor.py
CodSpeed Performance Gauge
+4%
37 ms35.5 ms
test_dag_cbor_decode_fixtures[map-with_complex_entries]
pytests/test_dag_cbor.py
CodSpeed Performance Gauge
+4%
28.1 µs27 µs
test_dag_cbor_decode[roundtrip24.json]
pytests/test_dag_cbor.py
CodSpeed Performance Gauge
+4%
13.2 µs12.7 µs
test_dag_cbor_decode[roundtrip11.json]
pytests/test_dag_cbor.py
CodSpeed Performance Gauge
+4%
13.8 µs13.4 µs
test_dag_cbor_decode_fixtures[map-keysort]
pytests/test_dag_cbor.py
CodSpeed Performance Gauge
+2%
18.6 µs18.1 µs
test_dag_cbor_decode_fixtures[cid-arrayof]
pytests/test_dag_cbor.py
CodSpeed Performance Gauge
+2%
19.2 µs18.8 µs
test_dag_cbor_decode_fixtures[garbage-12]
pytests/test_dag_cbor.py
CodSpeed Performance Gauge
-2%
20.8 µs21.2 µs
test_dag_cbor_decode_fixtures[int--9007199254740991]
pytests/test_dag_cbor.py
CodSpeed Performance Gauge
+1%
11.9 µs11.7 µs
test_dag_cbor_decode_fixtures[garbage-01]
pytests/test_dag_cbor.py
CodSpeed Performance Gauge
+1%
19.2 µs18.9 µs
test_dag_cbor_decode_fixtures[garbage-07]
pytests/test_dag_cbor.py
CodSpeed Performance Gauge
+1%
30.5 µs30.1 µs
test_dag_cbor_decode[roundtrip23.json]
pytests/test_dag_cbor.py
CodSpeed Performance Gauge
+1%
12.8 µs12.7 µs
test_dag_cbor_decode_fixtures[garbage-10]
pytests/test_dag_cbor.py
CodSpeed Performance Gauge
-1%
25 µs25.3 µs
test_dag_cbor_decode_fixtures[array-5-nested]
pytests/test_dag_cbor.py
CodSpeed Performance Gauge
-1%
16 µs16.2 µs
test_dag_cbor_decode_fixtures[int--2784428724]
pytests/test_dag_cbor.py
CodSpeed Performance Gauge
+1%
11.8 µs11.7 µs

Commits

Click on a commit to change the comparison range
Base
main
2163f07
+18.21%
Optimize DAG-CBOR encode/decode and CAR block parsing
1059358
2 months ago
by MarshalX
-0.24%
Fix clippy
341f165
2 months ago
by MarshalX
© 2026 CodSpeed Technology
Home Terms Privacy Docs