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
