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

Cache the result of the wiredtiger_crc32c_func() return value

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • WT11.0.0, 5.3.0, 5.2.0-rc5
    • Affects Version/s: None
    • Component/s: None

      Currently mongo calls wiredtiger_crc32c_func() every time it needs to compute a hash: https://github.com/mongodb/mongo/blob/3ab41506ca75092c5d71877791b5b07016c2d160/src/mongo/rpc/op_msg.cpp#L77. I attempted to do something similar and was crushed by the cost of the cpuid instruction that was executing on every call. We should either cache the result in a static in that function so that it is fast to call in a loop.

      If that is unacceptable or impossible for some reason, we should create a SERVER ticket to build a wrapper that does the caching.

            Assignee:
            keith.bostic@mongodb.com Keith Bostic (Inactive)
            Reporter:
            mathias@mongodb.com Mathias Stearn
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: