Investigate possible perf improvement by removing needless std::unique_ptr as class members

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Done
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Query Execution
    • Fully Compatible
    • QE 2024-10-28
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      In some places, we store a member of a class as std::unique_ptr<T> even if T is not polymorphic. 

      On hot path, this needless memory indirections can affect CPU cache and accumulate to some performance losses.

      We need to test if there are some performance gains hidden in this.

      There are a lot of cases in SBE where we store std::unique_ptr<vm::CodeFragment> instead of just vm::CodeFragment.
      https://github.com/search?q=repo%3Amongodb%2Fmongo%20std%3A%3Aunique_ptr%3Cvm%3A%3ACodeFragment%3E&type=code

            Assignee:
            Ivan Fefer
            Reporter:
            Ivan Fefer
            Votes:
            0 Vote for this issue
            Watchers:
            12 Start watching this issue

              Created:
              Updated:
              Resolved: