You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@joshua.apache.org by "bd2019us (JIRA)" <ji...@apache.org> on 2019/04/20 23:46:00 UTC
[jira] [Updated] (JOSHUA-342) Use replace() instead of replaceAll()
when no regex pattern is used
[ https://issues.apache.org/jira/browse/JOSHUA-342?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
bd2019us updated JOSHUA-342:
----------------------------
Attachment: JOSHUA-342.patch
> Use replace() instead of replaceAll() when no regex pattern is used
> -------------------------------------------------------------------
>
> Key: JOSHUA-342
> URL: https://issues.apache.org/jira/browse/JOSHUA-342
> Project: Joshua
> Issue Type: Improvement
> Reporter: bd2019us
> Priority: Minor
> Labels: pull-request-available
> Attachments: JOSHUA-342.patch
>
>
> ReplaceAll() has extra unneeded overhead when it is used without a regex argument. Use replace() instead to remove this overhead.
> Affected files:
> * src/main/java/org/apache/joshua/util/FormatUtils.java
> * src/main/java/org/apache/joshua/corpus/syntax/ArraySyntaxTree.java
> * src/main/java/org/apache/joshua/decoder/ff/FeatureVector.java
> * src/main/java/org/apache/joshua/mira/MIRACore.java
> * src/main/java/org/apache/joshua/zmert/MertCore.java
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)