You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
voiddo_move_assign(svector&& other) {
// if (!other.is_direct()) {// // take other's memory, even when empty// set_indirect(other.indirect());// } else {// auto* other_ptr = other.data<direction::direct>();// auto s = other.size<direction::direct>();// auto* other_end = other_ptr + s;//// std::uninitialized_move(other_ptr, other_end, data<direction::direct>());// std::destroy(other_ptr, other_end);// set_size(s);// }
m_data = std::move(other.m_data);
other.set_direct_and_size(0);
}
I notice that the original do move assign function is not efficient (using Vtune), and just move the m_data could significantly improve the performance.
Since the precondition is all uninitialized, I think move m_data directly is just equal to the previous code in results.
The text was updated successfully, but these errors were encountered:
I notice that the original do move assign function is not efficient (using Vtune), and just move the
m_data
could significantly improve the performance.Since the precondition is
all uninitialized
, I think movem_data
directly is just equal to the previous code in results.The text was updated successfully, but these errors were encountered: