
16 Apr
2012
16 Apr
'12
12:22 p.m.
On 04/16/2012 01:58 PM, Peter Dimov wrote:
Mathias Gaunard wrote:
On 16/04/12 01:10, Michael Kochetkov wrote:
boost uses the following comparison operator: inline bool operator==(uuid const& lhs, uuid const& rhs) /* throw() */ { return std::equal(lhs.begin(), lhs.end(), rhs.begin()); }
which end up with the following code: lea edx, DWORD PTR _id2$[esp+92] lea ecx, DWORD PTR _id1$[esp+108] lea eax, DWORD PTR _id1$[esp+92] call ?_Equal@std@@YA_NPBE00@Z ; std::_Equal
A good implementation of std::equal would call memcmp here, ...
It does.
The code above calls the std::_Equal symbol, not memcmp. The code given for std::_Equal also does not contain a jump to any other function.