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

   ## What
   
   - Batch `RunEndEncodedBuilder.AppendNulls` into one physical null value and 
one run.
   - Batch `RunEndEncodedBuilder.AppendEmptyValues` into one physical empty 
value and one run.
   - Keep zero and negative counts as no-ops.
   - Preserve the empty-value state used by JSON decoding.
   
   The old implementation called the scalar append method once per logical 
value. This change keeps the same API while avoiding the repeated physical 
values and run ends.
   
   ## Benchmark
   
   Apple M1 Pro, 65,536 rows, `int32` run ends and `int32` encoded values:
   
   | Case | Before | After | Speedup |
   | --- | ---: | ---: | ---: |
   | Nulls | ~1.0-1.6 ms, 1.16 MB, 55 allocs/op | ~1.0-1.5 us, 1.7 KB, 19 
allocs/op | ~1,250x |
   | Empty values | ~1.2-2.7 ms, 1.16 MB, 55 allocs/op | ~1.2-1.5 us, 1.7 KB, 
19 allocs/op | ~1,750x |
   
   The benchmark covers `int16`, `int32`, and `int64` run-end types, `int32` 
and string encoded values, and multiple batch sizes.
   
   ## Tests
   
   - `go test ./arrow/array -count=1`
   - `go test ./... -run '^$' -count=1 -p 2`
   


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