Skip to content

Optimize YMAP and YTYP IO while retaining zlib - #301

Merged
Hancapo merged 1 commit into
mainfrom
a/optimize-meta-io
Sep 9, 2026
Merged

Hancapo merged 1 commit into
mainfrom
a/optimize-meta-io

Conversation

@Hancapo

@Hancapo Hancapo commented Sep 9, 2026

Copy link
Copy Markdown
Owner

YMAP and YTYP IO spent most of its time interpreting scalar META fields in Python and compressing at zlib level 9. Compile bounded schema plans for a shared C++ scalar/vector codec, preserve existing complex-field resolution, move hash-field assignments into a native descriptor-aware base, and eliminate repeated conversions and empty-array allocations.

YMAP/YTYP now use zlib level 6; other resource callers retain level 9 by default. No new compression dependency or Python minimum-version change is introduced. The cp311 abi3 wheel remains supported.

On the synthetic 1,000-record corpus, YMAP read/write decreased from 32.01/40.54 ms to 8.07/5.60 ms and YTYP from 30.28/40.72 ms to 10.33/4.87 ms. All six map/type resource headers and uncompressed payloads remain identical. The largest YMAP grows about 4.5% after compression. These are local medians, not general performance guarantees.

Validation: 2,088 unit tests plus 7 subtests passed; 37 installed-wheel tests passed on Python 3.11 including explicit ABI-floor checks, codec boundaries, hash assignment/inheritance/copy/pickle and compression round trips. Benchmark assets, experimental dependencies and unrelated scenario documentation are excluded.

@Hancapo
Hancapo merged commit 0b9b1af into main Sep 9, 2026
2 checks passed
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