[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: SERVER-42949 Move values inside InMemIterator::next()
Branch: master
https://github.com/mongodb/mongo/commit/c6e8dec61cf71d1776110a8f13c6368c8a28e436

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