Patzifist commented on PR #864:
URL: https://github.com/apache/arrow-go/pull/864#issuecomment-4849168486

   Based on your feedback, I have updated the PR to implement **Option A 
(scoped accessor)**:
   
   1. **Implemented `VisitColumnBloomFilter`**: Added the scoped accessor 
method with a closure `func(BloomFilter) error`. It uses `defer` to promptly 
recycle the buffer right after the callback terminates.
   2. **Deterministic recycling**: The internal helper cancels the `AddCleanup` 
to prevent double-returning, shrinks the buffer using `ResizeNoShrink(0)`, and 
safely returns it to the pool.
   3. **Fixed the Benchmark**: Rewrote the benchmark using `b.RunParallel` and 
proper isolated calls (`b.ResetTimer() / b.ReportAllocs()`) so that `B/op` and 
`allocs/op` now genuinely reflect a single filter read.
   
   Please take a look when you have a moment!


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