
16 Apr
2012
16 Apr
'12
11:31 p.m.
Michael Kochetkov wrote:
boost::uuids::uuid id1((boost::uuids::random_generator()())), id2((boost::uuids::random_generator()()));
I prefer to leave id2 identical to id1 at the start, because otherwise the two are never equal. Core i7-920, VC++ 2005 32 bit: operator== 48830: 1087 Eq16 48830: 311 memcmp -53027366: 560 my_memcmp: 48830: 281 64 bit: operator== 48830: 674 Eq16 48830: 314 memcmp -2978538: 773 my_memcmp 48830: 264 Alignment is not the problem. id1 and id2 are aligned at a DWORD boundary (actually, on a 16 byte boundary under 64 bit).