4afb05d0cc
The current way were doing it would require copying a 768 character buffer (part of the Entry struct) to the new element in the vector. Given it's a plain array, std::move won't eliminate that. Instead, we can emplace an instance directly into the destination buffer and then fill it out, avoiding the need to perform any unnecessary copies. Given this is done in a loop, we can request the destination to allocate all of the necessary memory ahead of time, avoiding the need to potentially keep reallocating over and over on every few insertions into the vector. |
||
---|---|---|
.. | ||
filesystem.cpp | ||
filesystem.h | ||
fsp_ldr.cpp | ||
fsp_ldr.h | ||
fsp_pr.cpp | ||
fsp_pr.h | ||
fsp_srv.cpp | ||
fsp_srv.h |