fix(nimble): Estimate Dictionary alphabet cost and PFOR exception streams as min of bit-packed and raw Trivial (#957)#957
Open
duxiao1212 wants to merge 1 commit into
Conversation
|
@duxiao1212 has exported this pull request. If you are a Meta employee, you can view the originating Diff in D111057748. |
duxiao1212
added a commit
to duxiao1212/nimble
that referenced
this pull request
Jul 13, 2026
…eams as min of bit-packed and raw Trivial (facebookincubator#957) Summary: `DictionaryEncoding<T>::encode()` serializes the alphabet via recursive encoding selection (`encodeNested`), so the alphabet is stored with the best encoding for it -- usually bit-packed `FixedBitWidth`, not raw `Trivial`. Same case for PFOR exception streams Measured on a real MRS DataFM cluster index (exact-bit width on, all-1.0 read factors, 2000 input rows -> 11,839 KVs): 665,424,571 -> 658,483,444 bytes = -1.04%. Dictionary correctly wins more Int32/Int64 streams away from FixedBitWidth (FBW Int32 92MB->49MB, Dictionary Int32 72MB->119MB), all at smaller total size. Differential Revision: D111057748
38a7b7d to
6f09741
Compare
duxiao1212
added a commit
to duxiao1212/nimble
that referenced
this pull request
Jul 13, 2026
…eams as min of bit-packed and raw Trivial (facebookincubator#957) Summary: `DictionaryEncoding<T>::encode()` serializes the alphabet via recursive encoding selection (`encodeNested`), so the alphabet is stored with the best encoding for it -- usually bit-packed `FixedBitWidth`, not raw `Trivial`. Same case for PFOR exception streams Measured on a real MRS DataFM cluster index (exact-bit width on, all-1.0 read factors, 2000 input rows -> 11,839 KVs): 665,424,571 -> 658,483,444 bytes = -1.04%. Dictionary correctly wins more Int32/Int64 streams away from FixedBitWidth (FBW Int32 92MB->49MB, Dictionary Int32 72MB->119MB), all at smaller total size. Differential Revision: D111057748
6f09741 to
d3721c0
Compare
…eams as min of bit-packed and raw Trivial (facebookincubator#957) Summary: `DictionaryEncoding<T>::encode()` serializes the alphabet via recursive encoding selection (`encodeNested`), so the alphabet is stored with the best encoding for it -- usually bit-packed `FixedBitWidth`, not raw `Trivial`. Same case for PFOR exception streams Measured on a real MRS DataFM cluster index (exact-bit width on, all-1.0 read factors, 2000 input rows -> 11,839 KVs): 665,424,571 -> 658,483,444 bytes = -1.04%. Dictionary correctly wins more Int32/Int64 streams away from FixedBitWidth (FBW Int32 92MB->49MB, Dictionary Int32 72MB->119MB), all at smaller total size. Differential Revision: D111057748
d3721c0 to
f91df3c
Compare
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.
Summary:
DictionaryEncoding<T>::encode()serializes the alphabet via recursive encoding selection (encodeNested), so the alphabet is stored with the best encoding for it -- usually bit-packedFixedBitWidth, not rawTrivial. Same case for PFOR exception streamsMeasured on a real MRS DataFM cluster index (exact-bit width on, all-1.0 read factors, 2000 input rows -> 11,839 KVs): 665,424,571 -> 658,483,444 bytes = -1.04%. Dictionary correctly wins more Int32/Int64 streams away from FixedBitWidth (FBW Int32 92MB->49MB, Dictionary Int32 72MB->119MB), all at smaller total size.
Differential Revision: D111057748