Avatar for the MarshalX user
MarshalX
python-libipld
BlogDocsChangelog

Fix stack overflow when decoding deeply nested structures like arrays and maps

#51Merged
Comparing
fix-overflow-on-deep-structures
(
1083c37
) with
main
(
7bf9fb9
)
CodSpeed Performance Gauge
-29%
Improvement
4
Regression
8
Untouched
180

Benchmarks

192 total
test_dag_cbor_encode[roundtrip06.json]
pytests/test_dag_cbor.py
CodSpeed Performance Gauge
-29%
15.1 µs21.3 µs
test_dag_cbor_encode[roundtrip25.json]
pytests/test_dag_cbor.py
CodSpeed Performance Gauge
-27%
16 µs22 µs
test_dag_cbor_decode[roundtrip22.json]
pytests/test_dag_cbor.py
CodSpeed Performance Gauge
-26%
16.8 µs22.7 µs
test_dag_cbor_encode[roundtrip16.json]
pytests/test_dag_cbor.py
CodSpeed Performance Gauge
-24%
16.9 µs22.1 µs
test_dag_cbor_encode[roundtrip26.json]
pytests/test_dag_cbor.py
CodSpeed Performance Gauge
-12%
16.1 µs18.3 µs
test_dag_cbor_encode_real_data[canada.json]
pytests/test_dag_cbor.py
CodSpeed Performance Gauge
-12%
13.6 ms15.4 ms
test_dag_cbor_encode[roundtrip21.json]
pytests/test_dag_cbor.py
CodSpeed Performance Gauge
-11%
16.1 µs18.2 µs
test_dag_cbor_encode[roundtrip12.json]
pytests/test_dag_cbor.py
CodSpeed Performance Gauge
-11%
16.3 µs18.2 µs
test_dag_cbor_decode[roundtrip01.json]
pytests/test_dag_cbor.py
CodSpeed Performance Gauge
+39%
23.2 µs16.7 µs
test_dag_cbor_encode[roundtrip20.json]
pytests/test_dag_cbor.py
CodSpeed Performance Gauge
+36%
22.6 µs16.6 µs
test_dag_cbor_encode[roundtrip05.json]
pytests/test_dag_cbor.py
CodSpeed Performance Gauge
+35%
22.9 µs16.9 µs
test_dag_cbor_encode[roundtrip11.json]
pytests/test_dag_cbor.py
CodSpeed Performance Gauge
+30%
22.9 µs17.6 µs
test_dag_cbor_encode_real_data[twitter.json]
pytests/test_dag_cbor.py
CodSpeed Performance Gauge
-8%
5.1 ms5.6 ms
test_dag_cbor_decode[roundtrip07.json]
pytests/test_dag_cbor.py
CodSpeed Performance Gauge
-8%
15.7 µs17 µs
test_dag_cbor_encode[roundtrip23.json]
pytests/test_dag_cbor.py
CodSpeed Performance Gauge
+7%
17.6 µs16.4 µs
test_dag_cbor_decode_fixtures[float-1.1111111111111112]
pytests/test_dag_cbor.py
CodSpeed Performance Gauge
-7%
14.9 µs16.1 µs
test_dag_cbor_encode[roundtrip18.json]
pytests/test_dag_cbor.py
CodSpeed Performance Gauge
-7%
16.1 µs17.3 µs
test_dag_cbor_encode[roundtrip02.json]
pytests/test_dag_cbor.py
CodSpeed Performance Gauge
+7%
17.7 µs16.6 µs
test_dag_cbor_encode[roundtrip19.json]
pytests/test_dag_cbor.py
CodSpeed Performance Gauge
-6%
16.2 µs17.3 µs
test_dag_cbor_encode[roundtrip14.json]
pytests/test_dag_cbor.py
CodSpeed Performance Gauge
+6%
17.7 µs16.7 µs
test_dag_cbor_decode[roundtrip02.json]
pytests/test_dag_cbor.py
CodSpeed Performance Gauge
-6%
16.7 µs17.8 µs
test_dag_cbor_decode_fixtures[int--9007199254740991]
pytests/test_dag_cbor.py
CodSpeed Performance Gauge
-5%
15.6 µs16.5 µs
test_dag_cbor_decode[roundtrip26.json]
pytests/test_dag_cbor.py
CodSpeed Performance Gauge
-5%
16.8 µs17.8 µs
test_dag_cbor_decode[roundtrip21.json]
pytests/test_dag_cbor.py
CodSpeed Performance Gauge
-5%
16.8 µs17.7 µs
test_dag_cbor_encode[roundtrip09.json]
pytests/test_dag_cbor.py
CodSpeed Performance Gauge
-5%
20.4 µs21.5 µs

Commits

Click on a commit to change the comparison range
Base
main
7bf9fb9
-34.36%
delete bsky.network use in tests
4d2449e
2 years ago
by MarshalX
+2.57%
add cache for create_recursive_call_label
6b318b5
1 year ago
by MarshalX
+0.02%
fix import
4cf4ba3
1 year ago
by MarshalX
+0.82%
use ptr instead
0341332
1 year ago
by MarshalX
+2.17%
do not use Py_EnterRecursiveCall and Py_LeaveRecursiveCall; use only Py_GetRecursionLimit instead
4183c91
1 year ago
by MarshalX
-0.21%
cleanup
1083c37
1 year ago
by MarshalX
© 2026 CodSpeed Technology
Home Terms Privacy Docs