Uploaded image for project: 'WiredTiger'
  1. WiredTiger
  2. WT-3527

Use power of two hash table size

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 3.5.13, WT3.0.0
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None

      Given that we are using a high quality hash function (CityHash), we don't really need hash tables to be sized by prime numbers. Using a prime number modulo is useful to mitigate the effects of bad or unreliable (e.g. user provided) hash functions; that's not the case here. A power of two sizing (512 vs 509) results in about a 1% speedup when running open_cursor in a loop.

            Assignee:
            donald.anderson@mongodb.com Donald Anderson
            Reporter:
            donald.anderson@mongodb.com Donald Anderson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: