Uploaded image for project: 'Commons Lang'
  1. Commons Lang
  2. LANG-715

CharSetUtils.squeeze() speedup

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 3.0
    • 3.0
    • lang.*

    Description

      The attached patch speeds up CharSetUtils.squeeze() by avoiding unnecessary calls to CharSet.contains(). It should not slow down any cases, and in my tests with some use cases that I consider fairly common ones I got up to sixfold speedups with the patch.

      It's not that squeeze() would be that slow in the first place before the patch; I just happened to be playing around with caliper (http://code.google.com/p/caliper/) and squeeze() was one of the first things I tried it with.

      Attachments

        1. squeeze-speedup.patch
          0.7 kB
          Ville Skyttä

        Activity

          People

            ggregory Gary D. Gregory
            scop Ville Skyttä
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: