It is generally good practice, if you know how big the vector is going to be in the end, to reserve before continually calling "push_back" or "emplace_back"
Details
Details
Diff Detail
Diff Detail
Event Timeline
This revision is now accepted and ready to land.Dec 6 2022, 4:07 PM
gAlfonso-bit retitled this revision from Reserve memory before pushing back to [LLVM] Reserve memory before pushing back.Dec 7 2022, 2:51 PM
MaskRay retitled this revision from [LLVM] Reserve memory before pushing back to [llvm] Reserve memory before pushing back.Dec 8 2022, 12:38 AM
Closed by commit rG7f86bb0a713c: [llvm] Call reserve before push_back in a loop (authored by gAlfonso-bit, committed by MaskRay). · Explain WhyDec 8 2022, 12:42 AM
This revision was automatically updated to reflect the committed changes.
Drop unneeded change