Skip to content

Performance optimization - #329

Merged
chmp merged 24 commits into
mainfrom
feature/performance
Sep 26, 2026
Merged

chmp merged 24 commits into
mainfrom
feature/performance

Conversation

@chmp

@chmp chmp commented Sep 23, 2026 •

Copy link
Copy Markdown
Owner

Summary

Various performance experiments.

  • avoids missing-field scans for complete structs;
  • compacts static field-name caching;
  • remember canonical derived-struct layouts and skips repeated lookup/seen bookkeeping with safe fallback;
  • preserves duplicate field-name map semantics while allowing early lookup exit for unique schemas.
  • batches List and Binary offset updates;
  • uses append-oriented validity bitmap writes;
  • reserves BinaryView backing bytes for known-length sequences.
  • avoids discarded root metadata-vector allocation;
  • preallocates struct/union conversion and wide-schema setup vectors.

Checklist

  • Run the pre-commit checks locally with uv run python x.py precommit
  • Add tests for any new functionality
  • Update the relevant changelog (Changes.md for serde_arrow, marrow/Changes.md for marrow)

Benchmarks

func benchmark main mr change
to_marrow complex_1000 4.86 2.67 -45%
to_marrow primitives_1000 9.74 3.99 -59%
to_arrow complex_1000 4.82 2.96 -39%
to_arrow primitives_1000 9.67 6.65 -31%

@chmp chmp changed the title Feature/performance Performance optimization Sep 23, 2026
@chmp
chmp enabled auto-merge (squash) September 26, 2026 16:00
@chmp
chmp merged commit 1bf320b into main Sep 26, 2026
2 checks passed
@chmp
chmp deleted the feature/performance branch September 26, 2026 17:23
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