Commits


Jorge C. Leitao authored and Neville Dipale committed cbea7adc503
ARROW-11354: [Rust] Speed-up cast of dates and times (2-4x) This PR improves the performance of certain time / date casts by using the brand new API proposed in #9235 . That API allows for a very fast execution of unary and infalible operations on primitive arrays, and this PR leverages that for cast operations that require a simple mathematical operation. ``` Switched to branch 'fast_unary' Compiling arrow v3.0.0-SNAPSHOT (/Users/jorgecarleitao/projects/arrow/rust/arrow) Finished bench [optimized] target(s) in 1m 06s Running /Users/jorgecarleitao/projects/arrow/rust/target/release/deps/cast_kernels-25ee76597a8b997b Gnuplot not found, using plotters backend cast date64 to date32 512 time: [1.1668 us 1.1706 us 1.1749 us] change: [-83.347% -83.248% -83.144%] (p = 0.00 < 0.05) Performance has improved. Found 5 outliers among 100 measurements (5.00%) 3 (3.00%) high mild 2 (2.00%) high severe cast date32 to date64 512 time: [899.73 ns 930.58 ns 971.56 ns] change: [-86.799% -86.520% -86.190%] (p = 0.00 < 0.05) Performance has improved. Found 10 outliers among 100 measurements (10.00%) 3 (3.00%) high mild 7 (7.00%) high severe cast time32s to time32ms 512 time: [728.73 ns 732.33 ns 735.90 ns] change: [-54.503% -54.201% -53.917%] (p = 0.00 < 0.05) Performance has improved. Found 2 outliers among 100 measurements (2.00%) 1 (1.00%) high mild 1 (1.00%) high severe cast time64ns to time32s 512 time: [4.8374 us 4.8447 us 4.8526 us] change: [-57.022% -56.791% -56.587%] (p = 0.00 < 0.05) Performance has improved. Found 8 outliers among 100 measurements (8.00%) 6 (6.00%) high mild 2 (2.00%) high severe ``` Closes #9297 from jorgecarleitao/fast_unary Authored-by: Jorge C. Leitao <jorgecarleitao@gmail.com> Signed-off-by: Neville Dipale <nevilledips@gmail.com>