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

wiredtiger_crc_32c_func() should cache result

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Major - P3
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: Backlog
    • Component/s: None
    • Labels:

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              backlog-server-storage-engines Backlog - Storage Engines Team
              Reporter:
              redbeard0531 Mathias Stearn
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated: