Steven Lynn’s Blog

data lab 记录

2024-1-221,027 words4 min read
位运算的艺术
全程摆烂,都是网上查的。
test.sh

1

7 ops

2

6 ops

3

10 ops
判断所有偶数位。那 x >>= 1 后就是奇数位。

4

neg(x)
2 ops

5

29 ops
11 ops

6

7

8

9

10

11

12

 
Loading...