fallintoplace opened a new pull request, #1313:
URL: https://github.com/apache/arrow-go/pull/1313

   ## What does this change?
   
   - `DictionaryBuilder.AppendIndices` used to allocate a new typed slice on 
every call.
   - Convert the input values directly into the final typed index buffer.
   - Keep the existing bulk validity bitmap path.
   - Add coverage for all eight index types, nullable appends, split appends, 
and invalid validity lengths.
   - No public API changes.
   
   ## Benchmark
   
   Command:
   
   ```
   go test ./arrow/array -run '^$' -bench 
'^BenchmarkDictionaryBuilderAppendIndices$' -benchmem -benchtime=300ms -count=8
   ```
   
   Apple M1 Pro, Go 1.26.3. The benchmark uses 65,536 indices and a 256-entry 
dictionary.
   
   | Case | Before ns/op | After ns/op | Before B/op | After B/op | Allocs |
   | --- | ---: | ---: | ---: | ---: | ---: |
   | int32, non-null | 110,370 | 75,398 | 815,908 | 553,762 | 18 -> 17 |
   | int32, nullable | 116,578 | 75,895 | 815,907 | 553,762 | 18 -> 17 |
   
   This is about 32% less time and allocation bytes for the non-null case, and 
about 35% less time for the nullable case.
   
   The Parquet decoder's separate `[]uint64 -> []int` scratch conversion is 
intentionally outside this PR.
   
   ## Tests
   
   - `go test ./...`
   - `go test -race ./arrow/array`
   - `go vet ./arrow/array`


-- 
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]

Reply via email to