-
Type: Improvement
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
Service Arch
-
Fully Compatible
-
v8.0
-
Service Arch 2024-04-01, Service Arch 2024-04-15, Service Arch 2024-04-29
-
0
We have a few std::list usages where the most common case is a single element. In the most common case, we're heap-allocating and freeing a single element, which is wasteful. Similar to absl::InlinedVector, we can make a linked-list-like container where the first node is allocated inline with the container, making the first node free. All future elements will just default to heap-allocation.
This would benefit perf in two hot code paths:
Both of these linked lists are most commonly of size 1 and in the hot path of every operation. I observed about a 500ns speedup in the TransactionResources path, so I would expect about a 1 microsecond speedup by changing both, assuming we can't find others.
- is related to
-
SERVER-89144 optimizations in inlined_storage and dynamic_bitset
- Closed
- related to
-
SERVER-88448 Use cheaper containers in collection acquisition path
- Closed
-
SERVER-88771 Upgrade our macOS toolchain
- Closed