Repository navigation
feat(theta): serialize union results directly - #333
Open
Aschenbath wants to merge 1 commit into
Open
Aschenbath wants to merge 1 commit into
Aschenbath wants to merge 1 commit into
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.
Closes #320. Related to the Theta comparison suggested in #322, with a separate branch based on main.
Adds
ThetaUnion::serialize(ordered)for uncompressed compact output. It reuses the existing union result preparation and shares the compact encoder. The encoder can also serve a future intersection or mutable-compaction path once that operation produces canonical state. An uninitialized intersection would still need to be handled before encoding.cargo x test: 815 tests passed with the pinned TCK fixtures.cargo x checkand all eight benchmark smoke cases passed.to_sketch(ordered).serialize()on Linux x86_64, Rust 1.99.1, viacargo x bench -- theta::serde --raw. Five repetitions, medians in milliseconds (via compact → direct): 40 inputs unordered 57 → 46, ordered 83 → 70, 8,000 inputs unordered 86 → 87, ordered 225 → 223. The measured ranges overlap.AI-assisted with Codex.