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

Make perf improvements in setting/getting keys/values

    • Storage Engines
    • v8.0

      A small improvement in {get,set}_{keyv,valuev} (four functions): in code like this:

      if (LF_ISSET(WT_CURSOR_RAW_OK) || WT_STREQ(fmt, "u")) 

      if we change the order of comparison, we'll put the one that will always succeed for fast-path MongoDB code ahead of the one that will succeed rarely, or for slow-path Python testing.  For a workgen update workload, I see about a 1% improvement.

      In cursor_copy_release, we can make a better check at the top level, like this:

      -    if (FLD_ISSET(S2C(CUR2S(cursor))->debug_flags, WT_CONN_DEBUG_CURSOR_COPY)) {
      +    if (F_ISSET(cursor, WT_CURSTD_DEBUG_COPY_KEY | WT_CURSTD_DEBUG_COPY_VALUE)) { 

      These are flags that are not normally on for high performance cases.  This gives about a 2% improvement for the same workload.  These improvements should be independent of each other.

      (component: cursors)

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

              Created:
              Updated:
              Resolved: