Skip to content

Optimize DAG-CBOR encode by reusing a thread-local buffer and validating CIDs without Multihash construction - #116

Merged
MarshalX merged 2 commits into
mainfrom
optimize-encode-buffer-reuse-and-cid-parse
Jul 18, 2026
Merged

Optimize DAG-CBOR encode by reusing a thread-local buffer and validating CIDs without Multihash construction#116
MarshalX merged 2 commits into
mainfrom
optimize-encode-buffer-reuse-and-cid-parse

Conversation

@MarshalX

Copy link
Copy Markdown
Owner

No description provided.

@codspeed-hq

codspeed-hq Bot commented Jul 17, 2026

Copy link
Copy Markdown

Merging this PR will improve performance by 21.69%

⚡ 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)

Open in CodSpeed

@MarshalX
MarshalX merged commit 2e2e62d into main Jul 18, 2026
5 checks passed
@MarshalX
MarshalX deleted the optimize-encode-buffer-reuse-and-cid-parse branch July 18, 2026 00:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant