You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Sean Owen (JIRA)" <ji...@apache.org> on 2019/06/16 14:27:00 UTC

[jira] [Created] (SPARK-28066) Optimize UTF8String.trim() for common case of no whitespace

Sean Owen created SPARK-28066:
---------------------------------

             Summary: Optimize UTF8String.trim() for common case of no whitespace
                 Key: SPARK-28066
                 URL: https://issues.apache.org/jira/browse/SPARK-28066
             Project: Spark
          Issue Type: Improvement
          Components: Spark Core
    Affects Versions: 2.4.3
            Reporter: Sean Owen
            Assignee: Sean Owen


{{UTF8String.trim()}} allocates a new object even if the string has no whitespace, when it can just return itself. A simple check for this case makes the method about 3x faster in the common case.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org