[SOFT386]

Improve the performance of Soft386CalculateParity.


svn path=/branches/ntvdm/; revision=60621
This commit is contained in:
Aleksandar Andrejevic 2013-10-11 20:54:46 +00:00
parent da5b8fc439
commit 8dff09c37a

View file

@ -436,10 +436,7 @@ FORCEINLINE
BOOLEAN
Soft386CalculateParity(UCHAR Number)
{
Number ^= Number >> 1;
Number ^= Number >> 2;
Number ^= Number >> 4;
return !(Number & 1);
return (0x9669 >> ((Number & 0x0F) ^ (Number >> 4))) & 1;
}
FORCEINLINE