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

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

Attach filesAttach ScreenshotAdd voteVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    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

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            ben-zvi Boaz Ben-Zvi
            ben-zvi Boaz Ben-Zvi

            Dates

              Created:
              Updated:

              Slack

                Issue deployment