summaryrefslogtreecommitdiff
path: root/block/blk-ioc.c
diff options
context:
space:
mode:
authorJoel Becker <joel.becker@oracle.com>2008-12-17 00:54:40 +0300
committerMark Fasheh <mfasheh@suse.com>2009-01-05 19:40:35 +0300
commit58896c4d0e5868360ea0693c607d5bf74f79da6b (patch)
treed598e01e07eb5a6a5c45ba45017b41f6d33eed54 /block/blk-ioc.c
parent7bb458a58588f397068e4166c615e9fcc7480c16 (diff)
downloadlinux-58896c4d0e5868360ea0693c607d5bf74f79da6b.tar.xz
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>
Diffstat (limited to 'block/blk-ioc.c')
0 files changed, 0 insertions, 0 deletions