Uploaded image for project: 'Harmony'
  1. Harmony
  2. HARMONY-5265

[classlib][luni] TreeMap bug fixing and further performance improvements

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 5.0M4
    • 5.0M4
    • Classlib
    • None
    • Patch Available

    Description

      Attached patch is further development of idea shown in HARMONY-5232.
      As it was obtained using sorted arrays for small trees gives a boost over classical trees.

      "In case of small SortedMap storing data in sorted array leads to significant increasing of cache hits. Practical measurements shows that operation get() became 10-30% faster and operation put is 3-10% faster. Even additional overhead for moving data for put() operation is smaller then obtained benefit and as result we got speedup."

      HARMONY-5232 splitted internal tree representation into two parts: sorted array for small tree and classical tree for all other cases.
      The attached patch implements the idea that we can store the origival tree structure, but instead of storing one key in the tree node (classical tree) each tree node contains small sorted array of keys. As result we:

      • utilize performance benefits from "small sorted array" not only for small trees (as it was done in HARMONY-5232), but for all trees.
      • avoid internal dynamic switching between two kinds of internal tree representation and makes code simple.

      The latest fact has a big advantage for bug fixing, so fixing bugs described in HARMONY-5248 is much easier.
      The current patch fixes all problems with EUT (HARMONY-5248).

      Attachments

        1. TreeMap64Rv7.patch
          128 kB
          Sergey Kuksenko
        2. tree_d_patch.patch
          0.7 kB
          Sergey Kuksenko

        Issue Links

          Activity

            People

              cap Alexey Petrenko
              skuksenko Sergey Kuksenko
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: