Skip to content

Commit d605cdf

Browse files
committed
WIP: Improve bit-twiddling
1 parent 4a03043 commit d605cdf

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/bit-manipulation/bit-manipulation.jl

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,7 @@ end
4343

4444
@inline function gc_bitcount(x::Unsigned, ::NucleicAcidAlphabet{2})
4545
msk = repeatpattern(typeof(x), 0x55)
46-
c = x & msk
47-
g = (x >> 1) & msk
48-
return count_ones(c g)
46+
return count_ones((x (x >>> 1)) & msk)
4947
end
5048

5149
@inline function gc_bitcount(x::Unsigned, ::NucleicAcidAlphabet{4})

0 commit comments

Comments
 (0)