-
Type: Improvement
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
Labels:None
-
Fully Compatible
-
Execution Team 2019-08-26
-
0
Copy assignment of KeyString::Value is currently slow for a few reasons:
- It must call the copy assignment for TypeBits, preventing the structure's assignment from being inlined efficiently. This can be improved by transparently always appending TypeBits to the end of the buffer, but never including it in the actual KeyString.
- It must call the destructor for the local ConstSharedBuffer, and created a copy of the source buffer, subtracting and adding an atomic ref-counter on each. This shows up in perf and can be improved by implementing a swapping assignment like BSON does today.