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

   ## What
   Skip sorting Puffin blob indexes when offsets are already ordered.
   
   ## Why
   Sorting adds CPU time and a temporary index slice.
   
   ## Implementation
   - Scan adjacent offsets.
   - Allocate and sort indexes only if an inversion is found.
   - Keep physical read order and footer result order.
   
   ## Benchmark
   Checked-in `BenchmarkReadAllBlobs`, using 64-byte blobs. Exact base and PR 
head, Go 1.26.3, darwin/arm64, Apple M1 Pro, one CPU, 10 runs of 200 ms 
(median).
   
   | Workload | Before | After | Speedup | B/op | Allocs/op |
   | --- | ---: | ---: | ---: | ---: | ---: |
   | 16 sorted | 6.650 µs | 5.689 µs | 1.17x | 8,576 → 8,448 | 82 → 81 |
   | 16 shuffled | 6.791 µs | 6.521 µs | 1.04x | 8,576 → 8,576 | 82 → 82 |
   | 256 sorted | 102.98 µs | 94.11 µs | 1.09x | 137,472 → 135,424 | 1,282 → 
1,281 |
   | 256 shuffled | 108.83 µs | 100.24 µs | 1.08x | 137,472 → 137,472 | 1,282 → 
1,282 |
   | 1,024 sorted | 355.79 µs | 353.91 µs | ≈1.00x | 550,144 → 541,952 | 5,122 
→ 5,121 |
   | 1,024 shuffled | 427.47 µs | 441.62 µs | ≈1.00x | 550,144 → 550,144 | 
5,122 → 5,122 |
   
   Benchstat found no clear timing change at 1,024 blobs. Sorted cases save one 
allocation and up to 8 KiB per call. The fork base matches Apache main at 
`407a4cdc`.
   


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