[ 
https://issues.apache.org/jira/browse/HADOOP-6623?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Todd Lipcon updated HADOOP-6623:
--------------------------------

    Attachment: hadoop-6623.txt

Attached is an updated patch which adds a main() function to TestStringUtils 
which acts as a benchmark. Benchmark results;

Java impl #4:1339ms
Java impl #5:1095ms
Java impl #6:1257ms
Java impl #7:1386ms
Java impl #8:1470ms
Java impl #9:1467ms
StringUtils impl #4:274ms
StringUtils impl #5:274ms
StringUtils impl #6:274ms
StringUtils impl #7:277ms
StringUtils impl #8:289ms
StringUtils impl #9:291ms

If I double the number of separators in the test string to 10, results are:

Java impl #4:1407ms
Java impl #5:1411ms
Java impl #6:1449ms
Java impl #7:1443ms
Java impl #8:1641ms
Java impl #9:1409ms
StringUtils impl #4:347ms
StringUtils impl #5:347ms
StringUtils impl #6:346ms
StringUtils impl #7:347ms
StringUtils impl #8:355ms
StringUtils impl #9:346ms


> Add StringUtils.split for non-escaped single-character separator
> ----------------------------------------------------------------
>
>                 Key: HADOOP-6623
>                 URL: https://issues.apache.org/jira/browse/HADOOP-6623
>             Project: Hadoop Common
>          Issue Type: Improvement
>          Components: util
>    Affects Versions: 0.22.0
>            Reporter: Todd Lipcon
>            Assignee: Todd Lipcon
>            Priority: Minor
>         Attachments: hadoop-6623.txt, hadoop-6623.txt
>
>
> This is for HDFS-1028 but useful generally. String.split("/") for example is 
> way slower than an implementation that is specific to only single-character 
> separators.

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

Reply via email to