MarshalX / python-libipld

🏎️ Fast Python library to work with IPLD: DAG-CBOR, CID, CAR, multibase
https://pypi.org/project/libipld/
MIT License
17 stars 2 forks source link

Fix DAG-CBOR map keys order for encoding and decoding #18

Closed MarshalX closed 8 months ago

codspeed-hq[bot] commented 8 months ago

CodSpeed Performance Report

Merging #18 will improve performances by 41.51%

Comparing fix-map-keys-order (e2d9155) with main (10e190d)

Summary

⚡ 3 improvements ✅ 59 untouched benchmarks

Benchmarks breakdown

Benchmark main fix-map-keys-order Change
test_dag_cbor_encode_real_data[citm_catalog.json] 162.6 ms 125.3 ms +29.78%
test_dag_cbor_encode_real_data[github.json] 6.1 ms 4.8 ms +27.12%
test_dag_cbor_encode_real_data[twitter.json] 56.2 ms 39.7 ms +41.51%
MarshalX commented 8 months ago

ofc perf degradation because of new additional checks and sorts are here too. 3-7% for both encoding and decoding. you can see it in the detailed CodSpeed report