introduce bitloops

This commit is contained in:
mike
2026-01-20 10:42:00 +01:00
parent 5d0da1cf6b
commit 8780a26451

View File

@@ -250,7 +250,7 @@ public final class Masker {
}
if ((bitCount(rLo) + bitCount(rHi)) < MIN_LEN) penalty += 8000;
int wordLen = bitCount(rLo) + bitCount(rHi);
if (wordLen > 5) penalty += (wordLen - 5) * 1000L;
if (wordLen > 6) penalty += (wordLen - 6) * 1000L;
} else penalty += 25000;
}
for (long bits = hi_cl; bits != X; bits &= bits - 1) {
@@ -294,7 +294,7 @@ public final class Masker {
}
if ((bitCount(rLo) + bitCount(rHi)) < MIN_LEN) penalty += 8000;
int wordLen = bitCount(rLo) + bitCount(rHi);
if (wordLen > 5) penalty += (wordLen - 5) * 1000L;
if (wordLen > 6) penalty += (wordLen - 6) * 1000L;
} else penalty += 25000;
}