Marek Knápek@programming.dev to Programming@programming.dev · 10 months agoThe Little Things: The Missing Performance in std::vectorcodingnest.comexternal-linkmessage-square11fedilinkarrow-up154arrow-down12 cross-posted to: cpp@programming.dev
arrow-up152arrow-down1external-linkThe Little Things: The Missing Performance in std::vectorcodingnest.comMarek Knápek@programming.dev to Programming@programming.dev · 10 months agomessage-square11fedilink cross-posted to: cpp@programming.dev
minus-squarerobinm@programming.devlinkfedilinkarrow-up1·10 months agoIn C++ integer overflow is UB so this edge case cannot exist
minus-squarekornel@programming.devlinkfedilinkarrow-up3·10 months agoOnly signed overflow. size_t is unsigned.
minus-squarerobinm@programming.devlinkfedilinkarrow-up1·edit-210 months agoThat’s totally right but I thought you were talking about signed numbers since you said “integer overflow”. I forgot that len is usually unsigned in C++.
In C++ integer overflow is UB so this edge case cannot exist
Only signed overflow. size_t is unsigned.
That’s totally right but I thought you were talking about signed numbers since you said “integer overflow”. I forgot that
len
is usually unsigned in C++.