askoa commented on PR #3622: URL: https://github.com/apache/arrow-rs/pull/3622#issuecomment-1407753727
This is in continuation to previous comment https://github.com/apache/arrow-rs/pull/3622#issuecomment-1407681130 I looked into the current `take` benchmarks to see the parameters used for benchmarking. I see that the benchmarks typically have array_len = 512/1024 and take_len =512/1024. I updated the benchmarks for `primitive_run_take` to have similar parameters and the results are furnished below. The results look good for loop based approach as it works well for larger arrays and take values. Based on this result, I am removing the binary search based approach and using the loop based approach for `take_run`. However I think there is a potential for future optimization where the program automatically chooses between two approach based on input parameters. <details> <summary>Benchmark result</summary> ``` primitive_run_take/(run_array_len:512, physical_array_len:64, take_len:512) time: [17.302 µs 17.449 µs 17.654 µs] change: [+8.7767% +10.098% +11.338%] (p = 0.00 < 0.05) Performance has regressed. Found 6 outliers among 100 measurements (6.00%) 2 (2.00%) high mild 4 (4.00%) high severe primitive_run_take/(run_array_len:512, physical_array_len:128, take_len:512) time: [17.218 µs 17.307 µs 17.446 µs] change: [-5.5015% -4.1807% -3.1203%] (p = 0.00 < 0.05) Performance has improved. Found 4 outliers among 100 measurements (4.00%) 2 (2.00%) high mild 2 (2.00%) high severe primitive_run_take/(run_array_len:1024, physical_array_len:256, take_len:512) time: [17.184 µs 17.283 µs 17.420 µs] change: [-13.514% -12.644% -11.789%] (p = 0.00 < 0.05) Performance has improved. Found 8 outliers among 100 measurements (8.00%) 5 (5.00%) high mild 3 (3.00%) high severe primitive_run_take/(run_array_len:1024, physical_array_len:256, take_len:1024) time: [38.126 µs 38.393 µs 38.728 µs] change: [-29.471% -28.762% -27.898%] (p = 0.00 < 0.05) Performance has improved. Found 8 outliers among 100 measurements (8.00%) 5 (5.00%) high mild 3 (3.00%) high severe primitive_run_take/(run_array_len:2048, physical_array_len:512, take_len:512) time: [17.216 µs 17.297 µs 17.421 µs] change: [-22.495% -21.951% -21.439%] (p = 0.00 < 0.05) Performance has improved. Found 11 outliers among 100 measurements (11.00%) 6 (6.00%) high mild 5 (5.00%) high severe primitive_run_take/(run_array_len:2048, physical_array_len:512, take_len:1024) time: [38.055 µs 38.322 µs 38.670 µs] change: [-34.420% -33.418% -32.326%] (p = 0.00 < 0.05) Performance has improved. Found 3 outliers among 100 measurements (3.00%) 2 (2.00%) high mild 1 (1.00%) high severe primitive_run_take/(run_array_len:4096, physical_array_len:1024, take_len:512) time: [17.353 µs 17.430 µs 17.537 µs] change: [-27.334% -25.704% -23.314%] (p = 0.00 < 0.05) Performance has improved. Found 11 outliers among 100 measurements (11.00%) 2 (2.00%) high mild 9 (9.00%) high severe primitive_run_take/(run_array_len:4096, physical_array_len:1024, take_len:1024) time: [38.316 µs 38.830 µs 39.448 µs] change: [-32.168% -29.402% -25.753%] (p = 0.00 < 0.05) Performance has improved. Found 13 outliers among 100 measurements (13.00%) 4 (4.00%) high mild 9 (9.00%) high severe ``` </details> -- 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]
