Uploaded image for project: 'Xerces2-J'
  1. Xerces2-J
  2. XERCESJ-1464

SymbolTable.hash uses only 27 bits, when 31 are available

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 2.10.0
    • 2.11.0
    • Other
    • None
    • any

    Description

      The hash(...) functions mask out the five most significant bits. The usual approach is to only mask out the sign bit.

      This naturally raises the question whether the omission of one F in 0x7FF_FFFF was intentional or accidental.

      Even if it is changed to 0x7FFF_FFFF there shouldn't be large performance improvements since the distribution of the entries wouldn't be much better than now.

      In fact, I'm just curious why you chose 0x7FF_FFFF.

      Attachments

        Activity

          People

            mrglavas@ca.ibm.com Michael Glavassevich
            rillig Roland Illig
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 0.5h
                0.5h
                Remaining:
                Remaining Estimate - 0.5h
                0.5h
                Logged:
                Time Spent - Not Specified
                Not Specified