Joel Becker 58896c4d0e ocfs2: One more hamming code optimization.
The previous optimization used a fast find-highest-bit-set operation to
give us a good starting point in calc_code_bit().  This version lets the
caller cache the previous code buffer bit offset.  Thus, the next call
always starts where the last one left off.

This reduces the calculation another 39%, for a total 80% reduction from
the original, naive implementation.  At least, on my machine.  This also
brings the parity calculation to within an order of magnitude of the
crc32 calculation.

Signed-off-by: Joel Becker <joel.becker@oracle.com>
Signed-off-by: Mark Fasheh <mfasheh@suse.com>
2009-01-05 08:40:35 -08:00
..
2008-12-04 17:16:36 +11:00
2009-01-05 08:34:20 -08:00
2009-01-05 08:34:20 -08:00
2009-01-05 08:40:32 -08:00
2009-01-05 08:40:32 -08:00
2007-10-16 09:42:58 -07:00
2008-01-25 14:45:34 -08:00
2008-10-13 13:57:57 -07:00
2008-10-13 13:57:57 -07:00
2008-02-03 17:33:42 +02:00
2009-01-05 08:40:34 -08:00
2009-01-05 08:40:34 -08:00
2008-10-13 17:02:44 -07:00
2008-10-13 13:57:57 -07:00
2008-01-25 15:05:46 -08:00
2009-01-05 08:40:32 -08:00