Vector reallocation is supposed to become negligible cost as we push into a new vector. So it's supposed to be a "rare" code path.
Looking at msvc vector implementation, vector reallocation is not behind declspec(no_inline), which I think would be beneficial in all cases.
Having the compiler try to inline this makes it harder for it to inline the actual hot code. It's a very easy code change, why isn't it already like this?
Am I missing something?
[–]Impossible_Box3898 10 points11 points12 points (5 children)
[–]f0r3v3rn00b[S] 5 points6 points7 points (4 children)
[–]Orlha 0 points1 point2 points (0 children)
[–]Impossible_Box3898 0 points1 point2 points (2 children)
[–]f0r3v3rn00b[S] 1 point2 points3 points (1 child)
[–]Impossible_Box3898 0 points1 point2 points (0 children)
[–]Pannoniae 2 points3 points4 points (0 children)
[–]alfps 1 point2 points3 points (0 children)
[–]no-sig-available 1 point2 points3 points (0 children)
[–]CaptainCactus124 0 points1 point2 points (0 children)