perf(parquet): encode dictionary indices in RLE batches - #1328
Open
fallintoplace wants to merge 3 commits into
Open
fallintoplace wants to merge 3 commits into
fallintoplace wants to merge 3 commits into
Conversation
Member
|
Reproduced on linux/amd64 (AMD Ryzen 9 9950X, Go 1.26.0): Small nit: |
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.
What
Why
WriteIndicescurrently sends every index throughPut, including long repeated runs and complete literal groups.Implementation
PutBatchIndicesforint32indices.Benchmark
Command, run six times per version with before/after order alternated:
go test -run '^$' -bench '^BenchmarkDictEncoderWriteIndices$' -benchmem -benchtime=500ms -count=1 ./parquet/internal/encodingApple M1 Pro, Go 1.26.3,
GOMAXPROCS=1.WriteIndiceson 65,536 indices.Allocations stay at 232 B/op and 4 allocs/op. The benchmark also covers 64-index batches.
Compatibility
Tests
go test ./parquet/...go test -race ./parquet/internal/utils ./parquet/internal/encodinggo test -tags noasm ./parquet/internal/utils ./parquet/internal/encodinggo vet -composites=false ./parquet/internal/utils ./parquet/internal/encoding