[SERVER-69215] Improve AccumulatorTopBottomN() constructor Created: 27/Aug/22 Updated: 29/Oct/23 Resolved: 08/Sep/22 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 6.2.0-rc0 |
| Type: | Task | Priority: | Minor - P4 |
| Reporter: | Yoon Soo Kim | Assignee: | Ivan Fefer |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | neweng | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Backwards Compatibility: | Fully Compatible |
| Sprint: | QE 2022-09-19 |
| Participants: |
| Description |
|
There are three opportunities to improve AccumulatorTopBottomN<sense, single>::AccumulatorTopBottomN(). We can reserve vector elements so that we don't reallocate it as the vector size grows. https://github.com/10gen/mongo/blob/master/src/mongo/db/pipeline/accumulator_multi.cpp#L425 We can move objects in follow two cases. https://github.com/10gen/mongo/blob/master/src/mongo/db/pipeline/accumulator_multi.cpp#L437 https://github.com/10gen/mongo/blob/master/src/mongo/db/pipeline/accumulator_multi.cpp#L442 Better to save this for new engineers and so added neweng label. |
| Comments |
| Comment by Githook User [ 08/Sep/22 ] |
|
Author: {'name': 'Ivan Fefer', 'email': 'ivan.fefer@mongodb.com', 'username': 'Fefer-Ivan'}Message: |