mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2024-11-16 11:40:04 +00:00
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. |
||
---|---|---|
.. | ||
kernel | ||
service | ||
ipc_helpers.h | ||
ipc.h | ||
lock.cpp | ||
lock.h | ||
result.h |