commit | 7bb458a58588f397068e4166c615e9fcc7480c16 | [log] [tgz] |
---|---|---|
author | Joel Becker <joel.becker@oracle.com> | Mon Dec 15 18:24:33 2008 -0800 |
committer | Mark Fasheh <mfasheh@suse.com> | Mon Jan 05 08:40:35 2009 -0800 |
tree | a5d330c12f983837097f775e2d7c6c4d85fb9acd | |
parent | e798b3f8a920c82a8e556dd54df97f0d3d0f9144 [diff] |
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>