[SERVER-77228] Improve memory layout of NamespaceStringOrUUID Created: 17/May/23  Updated: 29/Oct/23  Resolved: 19/May/23

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 7.1.0-rc0, 7.0.0-rc2

Type: Improvement Priority: Major - P3
Reporter: Matt Broadstone Assignee: Matt Broadstone
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Problem/Incident
causes SERVER-77640 Remove unnecessary copies caused by N... Closed
Related
is related to SERVER-75529 Revisit memory layout for TenantId, D... Closed
Backwards Compatibility: Fully Compatible
Backport Requested:
v7.0
Sprint: Server Serverless 2023-05-29
Participants:

 Description   

The layout of NamespaceStringOrUUID is composed of many boost::optional s, as well as one unused boolean, adding up to a 102 byte width. Considering how often this type is used in the server, reducing its width to something that can fit on a cache line should improve overall performance.



 Comments   
Comment by Githook User [ 22/May/23 ]

Author:

{'name': 'Matt Broadstone', 'email': 'mbroadst@mongodb.com', 'username': 'mbroadst'}

Message: SERVER-77228 Improve memory layout of NamespaceStringOrUUID

(cherry picked from commit c7031fd1ee173dfe2cdbeed5313eb3a6c24d3f14)
Branch: v7.0
https://github.com/mongodb/mongo/commit/7ce0d319b16575b2bbed56d0f52606936f7345b3

Comment by Githook User [ 19/May/23 ]

Author:

{'name': 'Matt Broadstone', 'email': 'mbroadst@mongodb.com', 'username': 'mbroadst'}

Message: SERVER-77228 Improve memory layout of NamespaceStringOrUUID
Branch: master
https://github.com/mongodb/mongo/commit/c7031fd1ee173dfe2cdbeed5313eb3a6c24d3f14

Generated at Thu Feb 08 06:34:52 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.