Avatar for the MarshalX user
MarshalX
python-libipld
BlogDocsChangelog

Optimize DAG-CBOR decode by reading `Py_GetRecursionLimit` once per call

#112Merged
Comparing
optimize-recursion-limit-once-per-call
(
b8c24ae
) with
main
(
d8bee00
)
CodSpeed Performance Gauge
0%
Untouched
200

Benchmarks

200 total
test_decode[github-libipld]
benchmark/test_decode.py
CodSpeed Performance Gauge
+8%
527.8 µs487.2 µs
test_dag_cbor_decode_fixtures[garbage-21]
pytests/test_dag_cbor.py
CodSpeed Performance Gauge
-5%
19.2 µs20.3 µs
test_dag_cbor_decode_real_data[canada.json]
pytests/test_dag_cbor.py
CodSpeed Performance Gauge
+5%
39.9 ms38 ms
test_decode[canada-libipld]
benchmark/test_decode.py
CodSpeed Performance Gauge
+5%
40.1 ms38.2 ms
test_dag_cbor_decode_real_data[twitter.json]
pytests/test_dag_cbor.py
CodSpeed Performance Gauge
+3%
5.2 ms5 ms
test_decode[twitter-libipld]
benchmark/test_decode.py
CodSpeed Performance Gauge
+3%
5.2 ms5 ms
test_dag_cbor_decode_torture_cids
pytests/test_dag_cbor.py
CodSpeed Performance Gauge
+3%
35.4 ms34.3 ms
test_dag_cbor_decode_real_data[citm_catalog.json]
pytests/test_dag_cbor.py
CodSpeed Performance Gauge
+3%
14.4 ms13.9 ms
test_dag_cbor_decode_real_data[github.json]
pytests/test_dag_cbor.py
CodSpeed Performance Gauge
+3%
501.9 µs487.9 µs
test_decode_car
pytests/test_decode_car.py
CodSpeed Performance Gauge
+3%
367.3 ms357.3 ms
test_dag_cbor_encode[roundtrip07.json]
pytests/test_dag_cbor.py
CodSpeed Performance Gauge
-2%
11.9 µs12.2 µs
test_decode[citm_catalog-libipld]
benchmark/test_decode.py
CodSpeed Performance Gauge
+2%
14.3 ms14 ms
test_dag_cbor_decode_fixtures[array-9007199254740991]
pytests/test_dag_cbor.py
CodSpeed Performance Gauge
-2%
13 µs13.3 µs
test_dag_cbor_decode_fixtures[array-6433713753386423]
pytests/test_dag_cbor.py
CodSpeed Performance Gauge
-2%
13.1 µs13.4 µs
test_dag_cbor_decode[roundtrip26.json]
pytests/test_dag_cbor.py
CodSpeed Performance Gauge
-2%
12.6 µs12.9 µs
test_dag_cbor_decode_fixtures[array-500]
pytests/test_dag_cbor.py
CodSpeed Performance Gauge
-2%
12.6 µs12.9 µs
test_dag_cbor_decode_fixtures[int-2]
pytests/test_dag_cbor.py
CodSpeed Performance Gauge
-2%
10.3 µs10.5 µs
test_dag_cbor_decode_fixtures[int-255]
pytests/test_dag_cbor.py
CodSpeed Performance Gauge
-2%
10.4 µs10.6 µs
test_dag_cbor_decode_fixtures[map-nested]
pytests/test_dag_cbor.py
CodSpeed Performance Gauge
-2%
15.2 µs15.5 µs
test_dag_cbor_decode[roundtrip05.json]
pytests/test_dag_cbor.py
CodSpeed Performance Gauge
-2%
13.4 µs13.6 µs
test_dag_cbor_decode[roundtrip12.json]
pytests/test_dag_cbor.py
CodSpeed Performance Gauge
-2%
13.7 µs14 µs
test_dag_cbor_decode_fixtures[garbage-12]
pytests/test_dag_cbor.py
CodSpeed Performance Gauge
-2%
21 µs21.4 µs
test_dag_cbor_decode_fixtures[array-2]
pytests/test_dag_cbor.py
CodSpeed Performance Gauge
-2%
12.4 µs12.7 µs
test_dag_cbor_decode_fixtures[array-255]
pytests/test_dag_cbor.py
CodSpeed Performance Gauge
-2%
12.5 µs12.7 µs
test_dag_cbor_decode_fixtures[bytes-long-8bit]
pytests/test_dag_cbor.py
CodSpeed Performance Gauge
-2%
11.6 µs11.8 µs

Commits

Click on a commit to change the comparison range
Base
main
d8bee00
-0.4%
Optimize DAG-CBOR decode by reading `Py_GetRecursionLimit` once per call
b8c24ae
18 days ago
by MarshalX
© 2026 CodSpeed Technology
Home Terms Privacy Docs