Gus Heck created SOLR-15559:
-------------------------------

             Summary: Avoid object creation in splitSmart()
                 Key: SOLR-15559
                 URL: https://issues.apache.org/jira/browse/SOLR-15559
             Project: Solr
          Issue Type: Improvement
      Security Level: Public (Default Security Level. Issues are Public)
    Affects Versions: 8.9, main (9.0)
            Reporter: Gus Heck
            Assignee: Gus Heck


While reading code for other things I noticed a small inefficiency in the 
splitSmart(String, String, boolean) method where it's creating new 
StringBuilder objects unnecessarily inside a loop. For fun I fixed this and JMH 
bench marked the fix to see what it was worth. The answer is about 30% relative 
improvement, but only a couple microseconds absolute. Not exactly exciting 
since I don't think there's anywhere that really loops hard on this, but having 
it coded and tests passing and improvements measured, might as well put it in.

 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to