Skip to content

perf(parquet): SIMD BYTE_STREAM_SPLIT encoding - #1260

Open
fallintoplace wants to merge 2 commits into
apache:mainfrom
fallintoplace:perf/parquet-bss-simd-encode
Open

perf(parquet): SIMD BYTE_STREAM_SPLIT encoding#1260
fallintoplace wants to merge 2 commits into
apache:mainfrom
fallintoplace:perf/parquet-bss-simd-encode

Conversation

@fallintoplace

Copy link
Copy Markdown
Contributor

What

  • Add runtime-dispatched SIMD encoding for 4-byte and 8-byte BYTE_STREAM_SPLIT values.
  • Use NEON structure loads and unzip operations on arm64.
  • Use AVX2 unpacking on amd64.
  • Reuse the fast path for numeric encoders and fixed-length byte arrays of width 4 or 8.
  • Keep the scalar fallback for noasm builds and CPUs without the required feature.

Benchmark

Direct split benchmark with 65,536 values on an Apple M1 Pro, Go 1.26.3, 1 CPU, 150 ms, 7 runs. dispatch uses the NEON path on this machine.

Value width Scalar SIMD Speedup
4 bytes 113,877 ns/op 6,745 ns/op 16.9x
8 bytes 218,824 ns/op 28,861 ns/op 7.6x

Tests

  • go test ./parquet/internal/encoding
  • go test -tags noasm ./parquet/internal/encoding
  • GOOS=darwin GOARCH=amd64 go test -c -o /dev/null ./parquet/internal/encoding
  • PARQUET_TEST_DATA="$(pwd)/parquet-testing/data" go test ./...
  • go vet ./parquet/internal/encoding

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