Optimize DAG-CBOR encode by reusing a thread-local buffer and validating CIDs without Multihash construction - #116
Merged
CodSpeed HQ / CodSpeed Performance Analysis
succeeded
Jul 18, 2026 in 0s
Performance Gate Passed
⚡ 5 improved benchmarks
✅ 195 untouched benchmarks
Performance Changes
| Mode | Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|---|
| ⚡ | Simulation | test_dag_cbor_decode_torture_cids |
34.4 ms | 26.7 ms | +28.71% |
| ⚡ | Simulation | test_encode[github-libipld] |
478.4 µs | 385.1 µs | +24.21% |
| ⚡ | Simulation | test_dag_cbor_encode_real_data[github.json] |
457.8 µs | 368.9 µs | +24.1% |
| ⚡ | Simulation | test_encode[twitter-libipld] |
4 ms | 3.4 ms | +15.98% |
| ⚡ | Simulation | test_dag_cbor_encode_real_data[twitter.json] |
4 ms | 3.4 ms | +15.96% |
Tip
Curious why this is faster? Comment @codspeedbot explain why this is faster on this PR, or directly use the CodSpeed MCP with your agent.
Comparing optimize-encode-buffer-reuse-and-cid-parse (1995d1a) with main (7970600)
Loading