fallintoplace opened a new pull request, #2223:
URL: https://github.com/apache/iceberg-go/pull/2223
## What
- Speed up snapshot ancestry lookups for short chains.
## Why
- Short histories do not need a hash map allocation for every lookup.
## Implementation
- Keep 16 visited snapshot IDs inline, then use a map for longer chains.
- Preserve cycle detection and missing-parent handling.
## Benchmark
- Isolated ancestry lookup, 10-run median (Go 1.23.2, Linux AMD64):
- 4 snapshots: 89.9 to 20.1 ns/op (4.47x)
- 9 snapshots: 374.5 to 60.3 ns/op (6.21x)
- 16 snapshots: 873.3 to 117.2 ns/op (7.45x; 3 allocations to 0)
- 64 snapshots: 4,636 to 3,502 ns/op (1.32x)
- 256 snapshots: 18,633 to 18,098.5 ns/op (1.03x)
--
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]