
On 16/04/12 19:44, Michael Kochetkov wrote:
I do remember that at least memcpy intrinsic worked pretty smart in that compiler.
It does.
I think I see what's going on. memcmp has to return -1, 0 or 1. This is why it does an initial DWORD loop to find the first mismatch, then does a byte compare to determine the return value. Thank you for pointing it out. Frankly speaking being busy with finding out the attitude of the boost people towards the problem I have really skipped the rest of generated code that have probably made the MS compiler to look a little bit smarter than it really is.
Boost being used on many operating systems, compilers, and architectures, generic solutions are usually preferred over ad-hoc fixes for particular compiler combinations. That being said, a MSVC-specific workaround is possible too, if no other satisfying solution is found.