v1.2.3
What's Changed
⚡ Thanks to PGO and new Bound API in pyo3 v0.21 I achieved huge performance boost ones again! The pyo3 team did an awesome work! Many thanks to all contributors! Also, I implemented own CAR reader that gives +11%
- Migrate to pyo3 v0.21 Bound API by @MarshalX in #23
- Add PGO-optimized wheels by @MarshalX in #30, #21
- Add own implementation of CAR reader by @MarshalX in #28
- Add IPLD Codec Fixtures by @MarshalX in #19
- Add CAR and CID benchmarks by @MarshalX in #20
- Improve work with numbers by @MarshalX in #25
- Use refs in args and Bound in return type where possible by @MarshalX in #31
🏎️ Performance comparison. Before (v1.2.2) VS After (v1.2.3):
Raw bench results
Before (v1.2.2):
Hello World Decode:
===================
libipld : 275 ns
Hello World Encode:
===================
libipld : 237 ns
Realistic Decode Tests:
=======================
canada.json.dagcbor libipld : 7.51 ms (134.15 MB/s)
citm_catalog.json.dagcbor libipld : 4.97 ms (65.71 MB/s)
github.json.dagcbor libipld : 0.23 ms (201.43 MB/s)
twitter.json.dagcbor libipld : 2.70 ms (142.51 MB/s)
Realistic Decode Car Tests:
===========================
atproto_repo.car libipld : 170.09 ms (108.77 MB/s)
Realistic Encode Tests:
=======================
canada.json.dagcbor libipld : 1.89 ms (533.01 MB/s)
citm_catalog.json.dagcbor libipld : 2.86 ms (114.02 MB/s)
github.json.dagcbor libipld : 0.14 ms (335.64 MB/s)
twitter.json.dagcbor libipld : 1.07 ms (358.30 MB/s)
After (v1.2.3):
Hello World Decode:
===================
libipld : 130 ns
Hello World Encode:
===================
libipld : 143 ns
Realistic Decode Tests:
=======================
canada.json.dagcbor libipld : 5.24 ms (192.11 MB/s)
citm_catalog.json.dagcbor libipld : 3.49 ms (93.51 MB/s)
github.json.dagcbor libipld : 0.18 ms (257.51 MB/s)
twitter.json.dagcbor libipld : 2.11 ms (182.31 MB/s)
Realistic Decode Car Tests:
===========================
atproto_repo.car libipld : 123.72 ms (149.55 MB/s)
Realistic Encode Tests:
=======================
canada.json.dagcbor libipld : 1.22 ms (823.65 MB/s)
citm_catalog.json.dagcbor libipld : 1.69 ms (192.80 MB/s)
github.json.dagcbor libipld : 0.11 ms (410.94 MB/s)
twitter.json.dagcbor libipld : 0.80 ms (481.72 MB/s)
Test stand: M1 Pro, Python 3.12.
I highly recommend using Python 3.12. The lower version will be slower.
Full Changelog: v1.2.2...v1.2.3