Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-5727

Faster, simpler id.hashCode() which does not allocate memory

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 0.21.0
    • None
    • None
    • Reviewed

    Description

      Integer.valueOf allocates memory if the integer is not in the object-cache, which is the vast majority of cases for the task id. It is possible to compute the hash code of an integer without going via the integer cache, and hence avoiding allocating memory.

      Attachments

        1. 00_id-noallocate.patch
          0.3 kB
          Shevek
        2. 03_id-noallocate.patch
          0.5 kB
          Shevek
        3. 5727-0.patch
          0.4 kB
          Christopher Douglas

        Issue Links

          Activity

            People

              arren Shevek
              arren Shevek
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: