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