[SERVER-85219] Investigate possible perf improvement by removing needless std::unique_ptr as class members Created: 15/Jan/24 Updated: 18/Jan/24 |
|
| Status: | Open |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Ivan Fefer | Assignee: | Backlog - Query Execution |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Assigned Teams: |
Query Execution
|
| Participants: |
| Description |
|
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. |