fallintoplace opened a new pull request, #2115: URL: https://github.com/apache/iceberg-go/pull/2115
## What - Parse numeric REST partition values directly with `strconv`. ## Why - Avoid creating a JSON decoder and reader for each numeric value. ## Implementation - Validate the JSON value and keep the existing range checks. - Add edge case coverage and focused parser benchmarks. ## Benchmark Go 1.26.3, Apple M1 Pro, median of 5 runs (`-benchtime=1s -cpu=1`). Base `fa5309b`; PR `04ec1e3`. | Case | Base ns/op | PR ns/op | Base B/op | PR B/op | Base allocs/op | PR allocs/op | | --- | ---: | ---: | ---: | ---: | ---: | ---: | | Scan tasks, 1,024 | 4,091,483 | 2,424,957 | 5,161,315 | 2,671,002 | 37,894 | 31,750 | | Integer, 32-bit | 1,180 | 47.97 | 2,437 | 0 | 6 | 0 | | Integer, 64-bit | 1,180 | 48.05 | 2,437 | 0 | 6 | 0 | | Float, 32-bit | 1,196 | 68.71 | 2,440 | 0 | 6 | 0 | | Float, 64-bit | 1,216 | 68.01 | 2,440 | 0 | 6 | 0 | The 1,024-task case is 40.7% faster and uses 48.2% fewer bytes. Commands: ```sh go test ./catalog/rest -run '^$' -bench '^BenchmarkDecodeScanTasks/1024_tasks$' -benchmem -benchtime=1s -count=5 -cpu=1 go test ./catalog/rest -run '^$' -bench '^BenchmarkDecodeJSON(Integer|Float)$' -benchmem -benchtime=1s -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]
