Hello,
when copy-assigning a boost::container::vector<long> to another one of the same size, I would expect the code to end up as a call to memcpy (or possibly memmove). However, in boost, we end up in a hand-written loop in assign:
for ( ; first != last && cur != end_it; ++cur, ++first){
*cur = *first;
}
This makes the following crude benchmark 4-5 times slower than using std::vector from libstdc++ or libc++.
Hello, when copy-assigning a
boost::container::vector<long>
to another one of the same size, I would expect the code to end up as a call to memcpy (or possibly memmove). However, in boost, we end up in a hand-written loop in assign:This makes the following crude benchmark 4-5 times slower than using
std::vector
from libstdc++ or libc++.