Commits

Benjamin Kietzman authored 1c223f517f3
ARROW-10468: [C++][Compute] Provide KernelExecutor instead of FunctionExecutor This is a sub PR of ARROW-10322. The motivation is to defer dispatch and state initialization instead of handling these within FunctionExecutor, which will allow us to avoid multiple dispatches in the case of repeated execution of the same kernel(s). Initialization of KernelState is also deferred so that expensive state (for example hash table construction in the set lookup kernels) may be easily reused for multiple executions. A microbenchmark of kernel dispatch performance is also added. The changes here do not affect dispatch time. ``` Before: ------------------------------------------------------------------------------ Benchmark Time CPU Iterations ------------------------------------------------------------------------------ BM_CastDispatch/min_time:1.000 1515564 ns 1515530 ns 916 659.835k items/s BM_CastDispatchBaseline/min_time:1.000 236472 ns 236468 ns 5919 4.12978M items/s BM_AddDispatch/min_time:1.000 284 ns 284 ns 4921359 3.35523M items/s After: ------------------------------------------------------------------------------ Benchmark Time CPU Iterations ------------------------------------------------------------------------------ BM_CastDispatch/min_time:1.000 1583169 ns 1583129 ns 884 631.66k items/s BM_CastDispatchBaseline/min_time:1.000 233199 ns 233194 ns 5990 4.18776M items/s BM_AddDispatch/min_time:1.000 284 ns 284 ns 4901845 3.35489M items/s ``` Closes #8574 from bkietz/10468-Refactor-FunctionExecutor Authored-by: Benjamin Kietzman <bengilgit@gmail.com> Signed-off-by: Benjamin Kietzman <bengilgit@gmail.com>