max_empty_bit_range(): 30-50% speed up (David Fox)

master
szaka 2007-10-03 21:04:53 +00:00
parent 91604e7edd
commit 2caeb1b4e4
1 changed files with 6 additions and 1 deletions

View File

@ -51,7 +51,7 @@
* the update of the mapping pairs which converges to the cubic Faulhaber's
* formula as the function of the number of extents (fragments, runs).
*/
#define NTFS_LCNALLOC_BSIZE 8192
#define NTFS_LCNALLOC_BSIZE 4096
#define NTFS_LCNALLOC_SKIP NTFS_LCNALLOC_BSIZE
static void ntfs_cluster_set_zone_pos(LCN start, LCN end, LCN *pos, LCN tc)
@ -89,6 +89,11 @@ static s64 max_empty_bit_range(unsigned char *buf, int size)
for (i = 0; i < size; i++, buf++) {
if (*buf == 0) {
run += 8;
continue;
}
for (j = 0; j < 8; j++) {
int bit = *buf & (1 << j);