yuzu-emu
/
yuzu-android
Archived
1
0
Fork 0

maxwell_3d: Use insert instead of loop push_back

This reduces the overhead of bounds checking on each element.
It won't reduce the cost of allocation because usually this vector's
capacity is usually large enough to hold whatever we push to it.
This commit is contained in:
ReinUsesLisp 2020-07-12 05:05:04 -03:00
parent 9ea8cffe35
commit 622830f4e1
1 changed files with 1 additions and 3 deletions

View File

@ -132,9 +132,7 @@ void Maxwell3D::ProcessMacro(u32 method, const u32* base_start, u32 amount, bool
executing_macro = method; executing_macro = method;
} }
for (std::size_t i = 0; i < amount; i++) { macro_params.insert(macro_params.end(), base_start, base_start + amount);
macro_params.push_back(base_start[i]);
}
// Call the macro when there are no more parameters in the command buffer // Call the macro when there are no more parameters in the command buffer
if (is_last_call) { if (is_last_call) {