Marek Knápek@programming.dev to Programming@programming.dev · 1 year agoThe Little Things: The Missing Performance in std::vectorcodingnest.comexternal-linkmessage-square11fedilinkarrow-up152
arrow-up151external-linkThe Little Things: The Missing Performance in std::vectorcodingnest.comMarek Knápek@programming.dev to Programming@programming.dev · 1 year agomessage-square11fedilink
minus-squareGladaed@feddit.delinkfedilinkarrow-up1arrow-down1·1 year agoOk, but why did you not use emplace?
minus-squarerobinm@programming.devlinkfedilinkarrow-up1·1 year 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”.