Joel Becker 7bb458a585 ocfs2: Another hamming code optimization.
In the calc_code_bit() function, we must find all powers of two beneath
the code bit number, *after* it's shifted by those powers of two.  This
requires a loop to see where it ends up.

We can optimize it by starting at its most significant bit.  This shaves
32% off the time, for a total of 67.6% shaved off of the original, naive
implementation.

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