[SERVER-45854] Hold WorkingSetMembers at a distance for sorting Created: 29/Jan/20  Updated: 29/Oct/23  Resolved: 05/Feb/20

Status: Closed
Project: Core Server
Component/s: Querying
Affects Version/s: None
Fix Version/s: 4.3.4

Type: Improvement Priority: Major - P3
Reporter: David Storch Assignee: David Storch
Resolution: Fixed Votes: 0
Labels: qexec-team
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Problem/Incident
Related
Backwards Compatibility: Fully Compatible
Sprint: Query 2020-02-10
Participants:
Linked BF Score: 0

 Description   

If we buffer and sort WorkingSetMembers directly, then we pay for moving these objects during the std::swap()s performed by the Sorter's underlying call to std::stable_sort(). If we instead sort pointers to WorkingSetMembers, then these swaps are cheaper. This has been shown to improve the throughput of our blocking sort benchmark (Aggregation.Sort).



 Comments   
Comment by Githook User [ 05/Feb/20 ]

Author:

{'username': 'dstorch', 'name': 'David Storch', 'email': 'david.storch@mongodb.com'}

Message: SERVER-45854 Hold WorkingSetMembers at a distance for sorting.

This change improves the performance of blocking sort
operations executed in the PlanStage layer using the
SortStage.
Branch: master
https://github.com/mongodb/mongo/commit/8dbf4dec2a10a447bacd84dc336cac741d1bdc5a

Generated at Thu Feb 08 05:09:53 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.