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
Родитель df6a9f86e3
Коммит 32315cdefb
1 изменённых файлов: 5 добавлений и 3 удалений

Просмотреть файл

@ -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]));
}
/**