Skip to content

perf(reflect): decode length-delimited fields without temporary copies - #785

Open
fallintoplace wants to merge 2 commits into
anthropics:mainfrom
fallintoplace:perf/reflect-bounded-decode-20261020
Open

fallintoplace wants to merge 2 commits into
anthropics:mainfrom
fallintoplace:perf/reflect-bounded-decode-20261020

Conversation

@fallintoplace

Copy link
Copy Markdown
Contributor

What

Decode reflected length-delimited fields from bounded buffer views.

Why

The reflection decoder copies nested, map, and packed bytes before parsing them.

Implementation

  • Parse nested messages, map entries, and packed fields from bounded views.
  • Keep the raw copy for unknown closed-enum map values.

Benchmark

Rust 1.95, Apple M1 Pro, Criterion, 100 samples. Base e811550, head ad27f5b.

  • PackedTile reflective decode: 2.355 to 2.042 ms (13.3% faster, p < 0.05).
  • ColumnBatch: no change detected (p = 0.08).

@github-actions

Copy link
Copy Markdown

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

This branch has not been deployed

No deployments
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