commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "BELUGA BEHR (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (COMPRESS-233) Microbenchmarking TarBuffer#isEOFRecord
Date Fri, 19 Jul 2013 23:04:48 GMT

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

BELUGA BEHR commented on COMPRESS-233:
--------------------------------------

Sebb, Stefan,

I have re-wrote a chunk of the TAR archiver.  Please review.  I ultimately fell back to something
similar to what was there before (checking with a for-loop), but I took the code from IOUtils
and made an external call from isEOFRecord().  So now there's an external, easy-to-read method,
and a check without creating a buffer.

Please see:

https://issues.apache.org/jira/browse/COMPRESS-234
                
> 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