[SERVER-42949] Move values inside InMemIterator::next() Created: 21/Aug/19 Updated: 29/Oct/23 Resolved: 21/Aug/19 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 4.3.1 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Louis Williams | Assignee: | Louis Williams |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Backwards Compatibility: | Fully Compatible |
| Sprint: | Execution Team 2019-08-26 |
| Participants: |
| Description |
|
There is a simple optimization opportunity to move, rather than copy, elements when popping them from the deque in the InMemIterator. The value returned from "_data.front()" is copied, and then the original is immediately destructed with a call to "pop_front()", which does not return the element. |
| Comments |
| Comment by Githook User [ 21/Aug/19 ] |
|
Author: {'name': 'Louis Williams', 'email': 'louis.williams@mongodb.com', 'username': 'louiswilliams'}Message: |