cyb70289 commented on pull request #12338: URL: https://github.com/apache/arrow/pull/12338#issuecomment-1046498201
Benchmarked with PR https://github.com/apache/arrow/pull/12478, this specialized binary min/max improves performance significantly (test set = 32k integers). When there's no nulls, perf improves from 619 to 1084. Improvement is much bigger with nulls, as binary arithmetic kernel always runs the exec function regardless of nulls to leverage auto vectorization. max_element_wise(variadic) ``` MaxElementWiseArrayArrayInt64/32768/10000 139 us 139 us 5034 items_per_second=235.612M/s null_percent=0.01 size=32.768k MaxElementWiseArrayArrayInt64/32768/100 185 us 185 us 3787 items_per_second=177.552M/s null_percent=1 size=32.768k MaxElementWiseArrayArrayInt64/32768/10 269 us 269 us 2603 items_per_second=121.876M/s null_percent=10 size=32.768k MaxElementWiseArrayArrayInt64/32768/2 472 us 472 us 1483 items_per_second=69.4022M/s null_percent=50 size=32.768k MaxElementWiseArrayArrayInt64/32768/1 19.8 us 19.8 us 35449 items_per_second=1.65711G/s null_percent=100 size=32.768k MaxElementWiseArrayArrayInt64/32768/0 52.9 us 52.9 us 13172 items_per_second=619.058M/s null_percent=0 size=32.768k ``` maximum(binary) ``` MaxElementWiseArrayArrayInt64/32768/10000 30.3 us 30.3 us 23388 items_per_second=1079.83M/s null_percent=0.01 size=32.768k MaxElementWiseArrayArrayInt64/32768/100 30.3 us 30.3 us 23055 items_per_second=1082.26M/s null_percent=1 size=32.768k MaxElementWiseArrayArrayInt64/32768/10 30.2 us 30.2 us 23153 items_per_second=1085.95M/s null_percent=10 size=32.768k MaxElementWiseArrayArrayInt64/32768/2 30.4 us 30.4 us 23105 items_per_second=1079.41M/s null_percent=50 size=32.768k MaxElementWiseArrayArrayInt64/32768/1 30.1 us 30.1 us 23183 items_per_second=1086.96M/s null_percent=100 size=32.768k MaxElementWiseArrayArrayInt64/32768/0 30.2 us 30.2 us 23091 items_per_second=1084.69M/s null_percent=0 size=32.768k ``` -- 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]
