3 ms·
The small vector class contains a static array of a few bytes. And as long as your data fits in it, no extra heap allocation is needed. A vector always does hea
by PixelOfDeath 7y ago
The small vector class contains a static array of a few bytes. And as long as your data fits in it, no extra heap allocation is needed. A vector always does heap allocation, even if you only use a few bytes.
- Vogtinator 7y agoSounds like small string optimization (SSO), which is common in C++.
- bullen 7y agoOk, thx! If I use the trick Niklas calls “array with holes” in part 1, will each hole larger than the cache frame result in a cache miss?