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

   ## What
   
   - Add a trusted borrowed view for built-in manifest partition summaries.
   - Use the borrowed view in `manifestEvalVisitor.Eval`.
   - Fall back to `ManifestFile.Partitions()` for external implementations.
   - Keep the public `ManifestFile.Partitions()` defensive-copy behavior 
unchanged.
   - Add focused tests and benchmarks.
   
   ## Why
   
   `ManifestFile.Partitions()` copies the full summary slice, every lower and 
upper bound, and every `ContainsNaN` pointer. The manifest evaluator only reads 
these values during the current evaluation, so those copies are unnecessary on 
the built-in manifest path.
   
   ## Benchmark
   
   Command:
   
   ```text
   go test ./table -run '^$' -bench 
'^BenchmarkManifestEvaluatorBuiltInPartitions/manifests=1000/fields=32$' 
-benchmem -benchtime=200ms -count=5
   ```
   
   Median of 5 runs on an Apple M1 Pro with Go 1.26.3:
   
   | Case | Before | After |
   | --- | --- | --- |
   | 1,000 manifests, 32 fields | 4.97 ms/op, 4.27 MB/op, 194,000 allocs/op | 
2.14 ms/op, 816 KB/op, 33,000 allocs/op |
   
   This is about **57% lower latency**, **81% fewer bytes**, and **83% fewer 
allocations** in this wide-manifest evaluator workload.
   
   The benchmark also covers 1, 100, and 1,000 manifests with 1, 8, and 32 
partition fields.
   
   ## Testing
   
   - `go test ./table -count=1 -timeout=5m`
   - `go test ./table -race -run 
'^(TestManifestFilePartitions|TestManifestEvaluator|TestManifestEvalVisitorEvalRace)'
 -count=1 -timeout=5m`
   - `go test ./... -run '^$' -count=1`
   - `go vet ./table`
   


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to