Is trivial copy of inplace_vector if T is trivial something always desirable? I am imagining the case where I am copying a large capacity inplace_vector that is empty or almost empty (.size() ~ 0). Trivial copy will mean that I will copy a lot of bytes that don't contain anything.
If the capacity is so large that one starts to worry about memcpy performance (more than a few kB), then I probably don't want to use this type to have it on the stack.
1
u/frankist 3d ago
Is trivial copy of inplace_vector if T is trivial something always desirable? I am imagining the case where I am copying a large capacity inplace_vector that is empty or almost empty (.size() ~ 0). Trivial copy will mean that I will copy a lot of bytes that don't contain anything.