Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8317698

Optimization for URLEncoder

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Won't Fix
    • P4
    • None
    • 22
    • core-libs
    • None

    Description

      This is on behalf of wenshao .

      The current URLEncoder's Predicate for DONT_NEED_ENCODING is based on BitSet, which is actually a table lookup. The actual performance may not be as good as microbench.

      The character value range of DONT_NEED_ENCODING is between [45-122]. We can construct two long type constants to do the work of BitSet. This can improve performance by about 7% to 30%.

      PR: https://github.com/openjdk/jdk/pull/16082

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              jiefu Jie Fu
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: