Reserve your space in vector. Serioulsy, DO IT
Always reserve space for vector in advance if you know the expected size of a vector, this avoids reallocations which happen frequently when a vector gradually grows and breaches available capacityNote that, every time this breach happens, a new allo...
cppnuggets.hashnode.dev1 min read
Anтo
Mathematics and programming
interesting and fast to read, I hope to see new articles in that way !