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

   **What**
   - Speed up snapshot partition summaries.
   
   **Why**
   - `fmt.Sprintf` adds overhead for joining strings.
   
   **Implementation**
   - Use `k + "=" + v`. Keep the same sorting and output.
   - Add a benchmark for empty, append, overwrite and all-metric summaries.
   
   **Benchmark**
   Actual `partitionSummary` method, Apple M1 Pro, darwin/arm64, Go 1.26.3. 
Median of 5 runs, 300ms each, `-cpu=1`.
   
   | Metrics | Before ns/op | After ns/op | B/op before → after | Allocs/op 
before → after |
   | --- | ---: | ---: | ---: | ---: |
   | Empty (0) | 142.9 | 142.4 | 112 → 112 | 4 → 4 |
   | Append (3) | 1093 | 749.8 | 760 → 664 | 20 → 14 |
   | Overwrite (6) | 1885 | 1200 | 1152 → 960 | 32 → 20 |
   | All (16) | 6164 | 4371 | 4120 → 3608 | 72 → 40 |
   
   31–36% less time for nonempty summaries.
   
   ```sh
   go test ./table -run '^$' -bench '^BenchmarkPartitionSummary$' -benchmem 
-benchtime=300ms -count=5 -cpu=1
   ```
   


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