Uploaded image for project: 'Apache Drill'
  1. Apache Drill
  2. DRILL-6881

Hash-Table insert and probe: Compare hash values before keys

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 1.14.0
    • None
    • None

    Description

        When checking for existence of a key in the hash table (during put or probe operations), the value of that key is compared (using generated code) with a potential match key (same bucket).
         This comparison is slightly expensive (e.g., long keys, multi column keys, checking null conditions, NaN, etc). Instead, if the hash-values of the two keys are compared first (at practically zero cost), then the costly comparison can be avoided in case the hash values don't match.
      This code change is trivial, and given that the relevant Hash-Table code is hot code, then even minute improvements could add up.

      Attachments

        Activity

          People

            ben-zvi Boaz Ben-Zvi
            ben-zvi Boaz Ben-Zvi
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: