srowen commented on issue #25279: [SPARK-28519][SQL] Use StrictMath log, pow functions for platform independence URL: https://github.com/apache/spark/pull/25279#issuecomment-519195159 @gatorsmile here's a quick benchmark for `log()`: Previous: ``` Running benchmark: log Running case: log Stopped after 20 iterations, 6376 ms Java HotSpot(TM) 64-Bit Server VM 1.8.0_192-b12 on Mac OS X 10.14.6 Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz log: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ log 297 319 17 6.7 148.3 1.0X ``` Current: ``` Running benchmark: log Running case: log Stopped after 20 iterations, 6507 ms Java HotSpot(TM) 64-Bit Server VM 1.8.0_192-b12 on Mac OS X 10.14.6 Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz log: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ log 301 325 15 6.7 150.3 1.0X ``` Looks like it's slower by about 2 nanoseconds, but it's not even statistically significant. Even StrictMath is native code. I think we could say there is no perf hit.
---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
