commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Henri Yandell (JIRA)" <j...@apache.org>
Subject [jira] Commented: (LANG-512) Compare performance of replace method to regex in Java
Date Sat, 11 Jul 2009 07:16:14 GMT

    [ https://issues.apache.org/jira/browse/LANG-512?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12729956#action_12729956
] 

Henri Yandell commented on LANG-512:
------------------------------------

Some basic tests. Lang's much quicker than using the JDK's Regex code for static text.


Length: 19 replacing length 7 with length 6, 5000 times. 
LANG PERF: 0:00:00.017
JDK  PERF: 0:00:00.063

Length: 190 replacing length 7 with length 6, 5000 times. 
LANG PERF: 0:00:00.056
JDK  PERF: 0:00:00.143

Length: 1900 replacing length 7 with length 6, 5000 times. 
LANG PERF: 0:00:00.260
JDK  PERF: 0:00:01.125

Length: 19000 replacing length 7 with length 6, 5000 times. 
LANG PERF: 0:00:02.364
JDK  PERF: 0:00:07.258

Length: 17000 replacing length 17 with length 16, 5000 times. 
LANG PERF: 0:00:02.028
JDK  PERF: 0:00:11.250


> Compare performance of replace method to regex in Java
> ------------------------------------------------------
>
>                 Key: LANG-512
>                 URL: https://issues.apache.org/jira/browse/LANG-512
>             Project: Commons Lang
>          Issue Type: Sub-task
>            Reporter: Henri Yandell
>             Fix For: 3.0
>
>
> Can we delete our replace methods?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message