Bug 164580 - Back out fix. It's not much (if at all) faster and may cause problems on some architectures. r=glandium

This commit is contained in:
Justin Lebar 2011-10-16 15:28:36 -04:00
parent 76c3511501
commit fbe6419352

View File

@ -73,10 +73,12 @@ struct nsID {
*/
inline bool Equals(const nsID& other) const {
// First cast to void* in order to silence the alignment warnings.
// Unfortunately memcmp isn't faster than this.
return
((PRUint64*)(void*) &m0)[0] == ((PRUint64*)(void*) &other.m0)[0] &&
((PRUint64*)(void*) &m0)[1] == ((PRUint64*)(void*) &other.m0)[1];
((((PRUint32*) &m0)[0] == ((PRUint32*) &other.m0)[0]) &&
(((PRUint32*) &m0)[1] == ((PRUint32*) &other.m0)[1]) &&
(((PRUint32*) &m0)[2] == ((PRUint32*) &other.m0)[2]) &&
(((PRUint32*) &m0)[3] == ((PRUint32*) &other.m0)[3]));
}
/**