commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stefan Bodewig (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (COMPRESS-233) Microbenchmarking TarBuffer#isEOFRecord
Date Wed, 17 Jul 2013 14:48:52 GMT

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

Stefan Bodewig commented on COMPRESS-233:
-----------------------------------------

To me it is more about readability than about performance.

Worst case we are wasting the size of on record (512 bytes by default) and not gaining performance.
                
> Microbenchmarking TarBuffer#isEOFRecord
> ---------------------------------------
>
>                 Key: COMPRESS-233
>                 URL: https://issues.apache.org/jira/browse/COMPRESS-233
>             Project: Commons Compress
>          Issue Type: Improvement
>            Reporter: BELUGA BEHR
>            Priority: Minor
>             Fix For: 1.6
>
>         Attachments: TarBuffer.java.patch
>
>
> It's possible to speed up the regular checking of isEOFRecord by creating a buffer that
is all zeros then using the Java primitive Arrays.equals function.  My bench-marking puts
it at roughly 1/3 the time per check.  No unit tests were harmed in the production of these
modifications.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message