fallintoplace opened a new pull request, #1310:
URL: https://github.com/apache/arrow-go/pull/1310
## What changed
- `InsertOrGet` already receives a `[]byte`.
- It still called `getHash`, which accepts `interface{}` and boxed the slice.
- This now calls `Hash(val, 0)` directly, matching `GetOrInsertBytes`.
- There is no behavior change.
## Benchmark
`BenchmarkEncodeDictByteArray`, Apple M1 Pro, 5 runs at 500 ms each:
| | Before | After |
| --- | ---: | ---: |
| ns/op | 3.47 ms | 2.28 ms |
| B/op | 2,149,797 | 576,534 |
| allocs/op | 65,580 | 44 |
This is about **34% faster**, with **73% fewer bytes/op** and **99.93% fewer
allocations/op**.
## Testing
- `go test ./internal/hashing ./parquet/internal/encoding`
- `go test ./...` with `PARQUET_TEST_DATA` configured
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]