Repository navigation
Optimize YMAP and YTYP IO while retaining zlib - #301
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.