[ https://issues.apache.org/jira/browse/SPARK-53214?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Dongjoon Hyun resolved SPARK-53214. ----------------------------------- Fix Version/s: 4.1.0 Resolution: Fixed Issue resolved by pull request 51939 [https://github.com/apache/spark/pull/51939] > Use Java `HexFormat` instead of `Hex.encodeHexString` > ----------------------------------------------------- > > Key: SPARK-53214 > URL: https://issues.apache.org/jira/browse/SPARK-53214 > Project: Spark > Issue Type: Sub-task > Components: Kubernetes, Spark Core, SQL > Affects Versions: 4.1.0 > Reporter: Dongjoon Hyun > Assignee: Dongjoon Hyun > Priority: Major > Labels: pull-request-available > Fix For: 4.1.0 > > > Java native method is roughly **2x** faster. > {code} > scala> val a = new Array[Byte](1_000_000_000) > scala> spark.time(org.apache.commons.codec.binary.Hex.encodeHexString(a, > false).length) > Time taken: 1559 ms > val res0: Int = 2000000000 > scala> > spark.time(java.util.HexFormat.of().withUpperCase().formatHex(a).length) > Time taken: 672 ms > val res1: Int = 2000000000 > {code} -- This message was sent by Atlassian Jira (v8.20.10#820010) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org