fallintoplace opened a new pull request, #2202: URL: https://github.com/apache/iceberg-go/pull/2202
**What** - Clone DataFile Avro fields with a typed struct literal. **Why** - Avoid reflection when encoding manifest entries. **Implementation** - Copy the Avro fields and leave sync.Once and internal caches zeroed. - Check every Avro-tagged field in the clone test. **Benchmark** - Base 4fdbf65ef234b8715dbd2459d2851b7c6f576257, head 2236c49a7ef8494c55c30566b19fc3c1f60419f2. - Go 1.26.3, Apple M1 Pro, median of 8 one-second samples, CPU 1. - Baseline → typed copy: | Benchmark | ns/op | B/op | allocs/op | | --- | ---: | ---: | ---: | | Clone fields | 472.2 → 139.4 (3.4x) | 320 → 320 | 1 → 1 | | Marshal v1 | 2,123.5 → 1,871.5 (1.14x) | 1,160 → 1,160 | 11 → 11 | | Marshal v2 | 2,343 → 1,953.5 (1.20x) | 1,144 → 1,144 | 11 → 11 | | Marshal v3 | 2,386 → 2,034 (1.17x) | 1,144 → 1,144 | 11 → 11 | Command: `go test . -run '^$' -bench '^(BenchmarkCloneDataFileAvroFields|BenchmarkMarshalAvroEntry)$' -benchmem -benchtime=1s -count=8 -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]
