andygrove commented on PR #327: URL: https://github.com/apache/datafusion-spark/pull/327#issuecomment-7040725489
Thanks @kosiew. e0f7137 adds a criterion bench in `crates/spark/benches/dayofweek.rs`. Here are the numbers on 8192-row batches (Gelem/s), with `main` at 21334bb: | function | input | nulls | main | this PR | |---|---|---|---|---| | weekday | Date32 | 0% | 0.21 | 2.37 | | weekday | Date32 | 10% | 0.22 | 2.40 | | weekday | Date32 | 50% | 0.41 | 2.42 | | weekday | Date64 | 0% | 0.13 | 1.09 | | weekday | Date64 | 10% | 0.13 | 1.07 | | weekday | Date64 | 50% | 0.26 | 1.09 | | dayofweek | Date32 | 0% / 10% / 50% | n/a | 2.27 / 2.49 / 2.50 | | dayofweek | Date64 | 0% / 10% / 50% | n/a | 1.08 / 1.13 / 1.14 | So `weekday` is about 4x to 11x faster than going through `date_part`, and `dayofweek` runs at the same rate. -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
