C2: Micro-optimize Node lists grow

XMLWordPrintable

    • b22

      Seen this in Leyden profiles, but it is a generic issue. The profiles show Node::grow and VectorSet::grow as hot methods. The methods are small, and since they are implementing doubling-the-array scheme, we often exit early without actually growing.

      Outlining the actual growing part from the capacity check would allow inlining the common case.

            Assignee:
            Aleksey Shipilev
            Reporter:
            Aleksey Shipilev
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: