Author: aandrejevic
Date: Fri Oct 11 20:54:46 2013
New Revision: 60621
URL:
http://svn.reactos.org/svn/reactos?rev=60621&view=rev
Log:
[SOFT386]
Improve the performance of Soft386CalculateParity.
Modified:
branches/ntvdm/lib/soft386/common.inl
Modified: branches/ntvdm/lib/soft386/common.inl
URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/lib/soft386/common.inl?re…
==============================================================================
--- branches/ntvdm/lib/soft386/common.inl [iso-8859-1] (original)
+++ branches/ntvdm/lib/soft386/common.inl [iso-8859-1] Fri Oct 11 20:54:46 2013
@@ -436,10 +436,7 @@
BOOLEAN
Soft386CalculateParity(UCHAR Number)
{
- Number ^= Number >> 1;
- Number ^= Number >> 2;
- Number ^= Number >> 4;
- return !(Number & 1);
+ return (0x9669 >> ((Number & 0x0F) ^ (Number >> 4))) & 1;
}
FORCEINLINE