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

Use Switch Instead of InstanceOf For Snappy/LZ4

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: 1.15
    • Fix Version/s: 1.16
    • Component/s: Compressors
    • Labels:
      None

      Description

      Instead of checking for instanceof in determining block types emitted from Snappy/LZ4, use Enumerator + Switch statement.

      My micro-benchmarks indicate about a 1% performance improvement over the current implementation.

        Attachments

        1. COMPRESS-435.1.patch
          6 kB
          David Mollitor

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: