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

   ## What changed
   
   - Added direct serial execution for Take on record batches and tables when 
there is one column or NumParallel is 1 or less.
   - Added the same path for chunked index arrays when there is one index chunk 
or NumParallel is 1 or less.
   - Kept the existing errgroup path for actual parallel work.
   
   ## Why
   
   The old path created errgroup and goroutine setup even when the work was 
already serial. This adds overhead for small record batches, one-column tables, 
and chunked indices.
   
   ## Benchmarks
   
   Command:
   
   go test ./arrow/compute -run "^$" -bench 
"^BenchmarkTake(RecordSingleColumn|RecordMultiColumnSerial|TableSingleColumn|ArraySingleIndexChunk|ArrayMultiChunkSerial)$"
 -benchmem -benchtime=300ms -count=3
   
   Apple M1 Pro, Go 1.26.3, darwin/arm64.
   
   | Benchmark | Before | After |
   | --- | ---: | ---: |
   | Record, one column | 45 allocs/op, 3403 B/op | 36 allocs/op, 2642 B/op |
   | Record, 16 columns, serial | 480 allocs/op, 41945 B/op | 441 allocs/op, 
39380 B/op |
   | Table, one column | 52 allocs/op, 3819 B/op | 43 allocs/op, 3042 B/op |
   | Array, one index chunk | 44 allocs/op, 3370 B/op | 35 allocs/op, 2578 B/op 
|
   | Array, 8 index chunks, serial | 247 allocs/op, 17995 B/op | 224 allocs/op, 
16136 B/op |
   
   ## Tests
   
   - go test ./arrow/compute -count=1
   - go test -race ./arrow/compute -count=1
   - go test ./arrow/... -count=1
   - Full go test ./... -count=1 with the Parquet test data directory
   


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