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

Doug Cutting commented on AVRO-1348:
------------------------------------

Here are benchmarks run on my 64-bit Linux laptop.

Before:
{code}
java version "1.6.0_45"
test name     time    M entries/sec   M bytes/sec  bytes/cycle
 StringRead:   5495 ms       7.278       259.239       1780910
StringWrite:   5774 ms       6.927       246.725       1780910

java version "1.7.0_45"
 StringRead:   3541 ms      11.296       402.326       1780910
StringWrite:   4378 ms       9.136       325.421       1780910
{code}

After:
{code}
java version "1.6.0_45"
 test name     time    M entries/sec   M bytes/sec  bytes/cycle
 StringRead:   4882 ms       8.193       291.829       1780910
StringWrite:   5844 ms       6.844       243.754       1780910

java version "1.7.0_45"
 test name     time    M entries/sec   M bytes/sec  bytes/cycle
 StringRead:   3535 ms      11.315       403.020       1780910
StringWrite:   4136 ms       9.670       344.411       1780910
{code}

The speedup of the write benchmark under Java 7 is consistent and inexplicable.

This appears to achieve good performance in both Java 6 & 7.  I'll commit this 
unless someone objects.

> Improve Utf8 to String conversion
> ---------------------------------
>
>                 Key: AVRO-1348
>                 URL: https://issues.apache.org/jira/browse/AVRO-1348
>             Project: Avro
>          Issue Type: Bug
>            Reporter: Mark Wagner
>            Assignee: Mohammad Kamrul Islam
>         Attachments: AVRO-1348.patch, AVRO-1348v2.patch, AVRO1348v1.patch
>
>
> AVRO-1241 found that the existing method of creating Strings from Utf8 byte 
> arrays could be made faster. The same method is being used in the 
> Utf8.toString(), and could likely be sped up by doing the same thing.



--
This message was sent by Atlassian JIRA
(v6.1.4#6159)

Reply via email to