Uploaded image for project: 'Commons Compress'
  1. Commons Compress
  2. COMPRESS-233

Microbenchmarking TarBuffer#isEOFRecord

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Duplicate
    • None
    • 1.6
    • None
    • None

    Description

      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.

      Attachments

        1. TarBuffer.java.patch
          1 kB
          David Mollitor

        Issue Links

          Activity

            People

              Unassigned Unassigned
              belugabehr David Mollitor
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: