yaooqinn commented on a change in pull request #26622: [WIP][SPARK-28023][Test] Cheap UTF8String Trim URL: https://github.com/apache/spark/pull/26622#discussion_r348924667
########## File path: sql/core/benchmarks/CastBenchmark-results.txt ########## @@ -6,7 +6,7 @@ Java HotSpot(TM) 64-Bit Server VM 1.8.0_231-b11 on Mac OS X 10.15.1 Intel(R) Core(TM) i5-5287U CPU @ 2.90GHz Benchmark trim the string: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -cast(str as int) as c_int 7105 8190 945 1.2 867.3 1.0X -cast(str as long) as c_long 7520 8670 1629 1.1 918.0 0.9X +cast(str as int) as c_int 6263 8132 NaN 1.3 764.6 1.0X +cast(str as long) as c_long 8199 9737 NaN 1.0 1000.9 0.8X Review comment: cardinality * 2, (-) is trim (+) is non-copy trim, the cost for `copyMemory` an int or long value is trial, I guess. ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org