The Little Things: The Missing Performance in std::vectorcodingnest.comcross-posted to: cpp@programming.dev Marek Knápek ( @MarekKnapek@programming.dev ) Programming@programming.dev • 10 months ago message-square11fedilinkarrow-up142
arrow-up142external-linkThe Little Things: The Missing Performance in std::vectorcodingnest.com Marek Knápek ( @MarekKnapek@programming.dev ) Programming@programming.dev • 10 months ago message-square11fedilinkcross-posted to: cpp@programming.dev
minus-square Gladaed ( @Gladaed@feddit.de ) linkfedilink1•10 months agoOk, but why did you not use emplace?
minus-square robinm ( @robinm@programming.dev ) linkfedilink1•10 months agoemplace controls the construction of the object added to the collection. It’s also important but not related to the problem exposed by OP which is “how to remove the capacity check when we know statically that there is enough space”.
Ok, but why did you not use emplace?
emplace
controls the construction of the object added to the collection. It’s also important but not related to the problem exposed by OP which is “how to remove the capacity check when we know statically that there is enough space”.