From: Joel Becker Date: Tue, 16 Dec 2008 21:54:40 +0000 (-0800) Subject: ocfs2: One more hamming code optimization. X-Git-Tag: v2.6.29-rc1~505^2~14 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=58896c4d0e5868360ea0693c607d5bf74f79da6b;p=pandora-kernel.git 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 Signed-off-by: Mark Fasheh --- Reading git-diff-tree failed