Commits


Heres, Daniel authored and Andrew Lamb committed 8dd6abbb72b
ARROW-12032: [Rust] Optimize comparison kernels This adds a function `from_trusted_len_iter_bool` to speed up the creation of an array for booleans. Benchmarks are a bit noisy, but seems to be ~10-20% faster for comparison kernels. This also has some positive effect on DataFusion queries, as they contain quite some (nested) comparisons in filters. For example, executing tpch query 6 in memory is ~7% faster. ``` Gnuplot not found, using plotters backend eq Float32 time: [54.204 us 54.284 us 54.364 us] change: [-29.087% -28.838% -28.581%] (p = 0.00 < 0.05) Performance has improved. Found 6 outliers among 100 measurements (6.00%) 5 (5.00%) low mild 1 (1.00%) high mild eq scalar Float32 time: [43.660 us 43.743 us 43.830 us] change: [-30.819% -30.545% -30.269%] (p = 0.00 < 0.05) Performance has improved. Found 5 outliers among 100 measurements (5.00%) 4 (4.00%) high mild 1 (1.00%) high severe neq Float32 time: [68.726 us 68.893 us 69.048 us] change: [-14.045% -13.772% -13.490%] (p = 0.00 < 0.05) Performance has improved. Found 1 outliers among 100 measurements (1.00%) 1 (1.00%) high mild neq scalar Float32 time: [46.251 us 46.322 us 46.395 us] change: [-12.204% -11.952% -11.702%] (p = 0.00 < 0.05) Performance has improved. Found 6 outliers among 100 measurements (6.00%) 1 (1.00%) low mild 5 (5.00%) high mild lt Float32 time: [50.264 us 50.438 us 50.613 us] change: [-21.300% -20.964% -20.649%] (p = 0.00 < 0.05) Performance has improved. lt scalar Float32 time: [48.847 us 48.929 us 49.013 us] change: [-10.132% -9.9180% -9.6910%] (p = 0.00 < 0.05) Performance has improved. Found 5 outliers among 100 measurements (5.00%) 4 (4.00%) high mild 1 (1.00%) high severe lt_eq Float32 time: [46.105 us 46.198 us 46.282 us] change: [-21.276% -20.966% -20.703%] (p = 0.00 < 0.05) Performance has improved. Found 18 outliers among 100 measurements (18.00%) 2 (2.00%) low severe 13 (13.00%) low mild 1 (1.00%) high mild 2 (2.00%) high severe lt_eq scalar Float32 time: [47.359 us 47.456 us 47.593 us] change: [+0.2766% +0.5240% +0.7821%] (p = 0.00 < 0.05) Change within noise threshold. Found 10 outliers among 100 measurements (10.00%) 8 (8.00%) high mild 2 (2.00%) high severe gt Float32 time: [57.313 us 57.363 us 57.412 us] change: [-18.328% -18.177% -18.031%] (p = 0.00 < 0.05) Performance has improved. Found 3 outliers among 100 measurements (3.00%) 2 (2.00%) low severe 1 (1.00%) low mild gt scalar Float32 time: [44.091 us 44.132 us 44.175 us] change: [-9.4233% -9.2747% -9.1273%] (p = 0.00 < 0.05) Performance has improved. Found 7 outliers among 100 measurements (7.00%) 4 (4.00%) low mild 3 (3.00%) high mild gt_eq Float32 time: [55.856 us 55.932 us 56.007 us] change: [-7.4997% -7.2656% -7.0334%] (p = 0.00 < 0.05) Performance has improved. Found 3 outliers among 100 measurements (3.00%) 1 (1.00%) low mild 2 (2.00%) high mild gt_eq scalar Float32 time: [42.365 us 42.419 us 42.482 us] change: [+0.5289% +0.7174% +0.9116%] (p = 0.00 < 0.05) Change within noise threshold. Found 5 outliers among 100 measurements (5.00%) 2 (2.00%) high mild 3 (3.00%) high severe ``` Closes #9759 from Dandandan/optimize_comparison Authored-by: Heres, Daniel <danielheres@gmail.com> Signed-off-by: Andrew Lamb <andrew@nerdnetworks.org>