[ 
https://issues.apache.org/jira/browse/SOLR-15559?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17387670#comment-17387670
 ] 

ASF subversion and git services commented on SOLR-15559:
--------------------------------------------------------

Commit 5e8857c62e6864001c729cd21ddf29d23441b8ca in solr's branch 
refs/heads/main from Gus Heck
[ https://gitbox.apache.org/repos/asf?p=solr.git;h=5e8857c ]

SOLR-15559 Small optimization in StrUtils.splitSmart() (#235)



> 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: main (9.0), 8.9
>            Reporter: Gus Heck
>            Assignee: Gus Heck
>            Priority: Minor
>         Attachments: MyBenchmark.java
>
>          Time Spent: 40m
>  Remaining Estimate: 0h
>
> 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