Releases: MarshalX/python-libipld
v3.4.1
What's Changed
This is a focused decode-side optimization. The numbers below come from pytest-benchmark on Apple M1 / CPython 3.14 (PGO-built wheels), comparing v3.4.0 → v3.4.1 head-to-head.
⚡ Decode (DAG-CBOR)
| Fixture | v3.4.0 | v3.4.1 | Speedup |
|---|---|---|---|
canada |
4.75 ms | 4.43 ms | 1.07x (+7%) |
github |
69 µs | 66 µs | 1.05x (+5%) |
twitter |
790 µs | 766 µs | 1.03x (+3%) |
citm_catalog |
1.79 ms | 1.77 ms | 1.01x (+1%) |
The decoder used to fetch the Python recursion limit on every recursive step. We now read it once per top-level decode call and pass it through, closing the last decode gap with cbrrr (we're within 0.7% of it on canada and 30–40% ahead on the others).
🔧 Optimizations
Deserialization v3.4.0 → v3.4.1
Serialization v3.4.0 → v3.4.1
Full Changelog: v3.4.0...v3.4.1
v3.4.0
What's Changed
❗ Up to ~2x faster DAG-CBOR encode and decode!
This release is all about throughput. The numbers below come from pytest-benchmark on an Apple M1 / CPython 3.14, comparing v3.3.2 → v3.4.0 head-to-head.
⚡ Decode (DAG-CBOR)
| Fixture | v3.3.2 | v3.4.0 | Speedup |
|---|---|---|---|
github |
138 µs | 70 µs | 1.96x (+96%) |
twitter |
1.44 ms | 0.80 ms | 1.81x (+81%) |
citm_catalog |
2.87 ms | 1.81 ms | 1.59x (+59%) |
canada |
5.49 ms | 4.77 ms | 1.15x (+15%) |
⚡ Encode (DAG-CBOR)
| Fixture | v3.3.2 | v3.4.0 | Speedup |
|---|---|---|---|
canada |
2.31 ms | 1.17 ms | 1.98x (+98%) |
citm_catalog |
2.25 ms | 1.26 ms | 1.79x (+79%) |
twitter |
902 µs | 635 µs | 1.42x (+42%) |
github |
75.4 µs | 69.7 µs | 1.08x (+8%) |
🔧 Optimizations
- Optimize DAG-CBOR encode/decode and CAR block parsing by @MarshalX in #104
- Optimize DAG-CBOR string decode with an ASCII fast path by @MarshalX in #105
- Optimize DAG-CBOR map decode with a key-intern cache and
KnownHashinsert by @MarshalX in #106 - Optimize int encode with a direct
PyLongdigit read by @MarshalX in #107
🧰 Toolchain & Build
- Bump to Rust 1.95 and PyO3 0.28 by @MarshalX in #102
- Drop the macos-13 PGO runner; cross-compile x86_64 macOS wheels from arm64 by @MarshalX in #108
- Bump CI actions (Node 24) and
pytest-codspeedv5 by @MarshalX in #103
📊 Benchmarks & Docs
- Add a head-to-head benchmark against other Python DAG-CBOR libs by @MarshalX in #109
- Update README and copyright years by @MarshalX in #110
Deserialization v3.3.2 → v3.4.0
Serialization v3.3.2 → v3.4.0
Full Changelog: v3.3.2...v3.4.0
v3.3.2
v3.3.1
v3.3.0
What's Changed
❗ Almost x2 speed for CAR decoding (Bluesky firehose), ~25-35% faster DAG-CBOR decoding, and ~17% faster CID decoding!
I do have more ideas on what to try to speed it up even further! For example, applying BOLT on top of the existing PGO.
⚡ Optimizations
- Huge performance gain for DAG-CBOR decoding and CID by replacing deprecated Rust crate
libipldwithcbor4iiby @vmx in #80 and even contributed upstream! - Optimize DAG-CBOR encoding for arrays and maps by @MarshalX in #88
- Optimize CAR decoding by reducing allocations by @MarshalX in #90
- Optimize executable size (
panic = "abort") by @MarshalX in #86
Other
- Add
pytest-benchmarkGitHub Actions workflow by @MarshalX in #82 - Add lint and format check GHA workflow by @MarshalX in #83
- Add CONTRIBUTING.md by @MarshalX in #85
- Update CodSpeed by @MarshalX in #81
- Fix formatting in profiling by @MarshalX in #84
🏎️ Performance comparison. Before (v3.2.0) VS After (v3.3.0):
You can find more benchmark results here: #92
New Contributors
Full Changelog: v3.2.0...v3.3.0
v3.2.0
What's Changed
❗ Possible breaking change for you: dropped support for PyPy 3.9 and PyPy 3.10 (both no longer supported upstream) in #77. CPython is still supported from 3.8 to 3.14.
- Add Python 3.14 support by @moreati in #74
- Update Rust to 1.90 by @MarshalX in #75
- Update PyO3 to 0.27.1 by @MarshalX in #75
- Fix repository URL specification in
pyproject.tomlfile by @moreati in #73 - Fix clippy warnings by @MarshalX in #76
- Fix CodSpeed by @MarshalX in #78
New Contributors
Full Changelog: v3.1.1...v3.2.0
v3.1.1
v3.1.0
What's Changed
- Add type stubs by @zzstoatzz in #56
- Add PyPy 3.11 support by @MarshalX in #63
- Update PyO3 to 0.25.1 with performance optimizations by @MarshalX in #63
- Update README by @MarshalX in #64
- Fix panic on encoding map with integer keys by @MarshalX in #60
- Fix panic on non UTF-8 string by @MarshalX in #59
- Fix smallest and largest CBOR integer roundtrip by @MarshalX in #58
- Fix decoding of infinities and NaNs according to specs by @MarshalX in #62
- Fix handling of concatenated objects / CBOR sequence by @MarshalX in #65
New Contributors
- @zzstoatzz made their first contribution in #56
- @makew0rld reported a lot of bugs in #57 during the work on test suite for DASL
Full Changelog: v3.0.1...v3.1.0
v3.0.1
What's Changed
- Update PyO3 to 0.23.4 by @MarshalX in #54
- Specify the dynamic version in
pyproject.tomlby @fxcoudert in #53 - Fix stack overflow when decoding deeply nested structures like arrays and maps by @MarshalX in #51
Possible breaking change for you: dropped support for PyPy 3.8
New Contributors
- @fxcoudert made their first contribution in #53
Full Changelog: v3.0.0...v3.0.1
v3.0.0
What's Changed
❗ Breaking changes
🆕 Features
Other
- Update PyO3 to 0.22.5 by @MarshalX in #50
- Update
decode_carsignature,bytesCIDs instead ofstrin README by @snarfed in #49
New Contributors
Full Changelog: v2.0.0...v3.0.0
