News for hackers. Stuff that matters.
Re:Effortless Performance Improvements in C++: std:vector by zabzonk on Wednesday March 08, 2023 @06:39PM (#35076301)
> std::string can store <=22 character strings without needing to allocate

implementation dependent - the c++ standard says nothing on this

Re:Effortless Performance Improvements in C++: std:vector by TylerGlaiel on Wednesday March 08, 2023 @07:29PM (#35076741)
sure but this is how pretty much every implementation does it these days, so you should be able to safely rely on that (or just drop in your own version that provides that guarantee if you are really concerned about it)