Bit-Parallel Subset-Sum — B |= B << w

Bit s set means "sum s is reachable". Adding item w shifts every reachable sum up by w (one instruction, 64 lanes) and OR-merges — the /64 win.

step 0

Items to fold in

Reachable-sums bitset B

B = 1  (only sum 0 reachable: the empty subset)
current B (bit s lit ⇒ sum s reachable):
reachable sums: 1 popcount(B) = 1 smallest positive sum:
already reachable shifted copy (B << w) newly reachable this step
Press Step to begin. We start with only sum 0 reachable, then fold in each item with one shift-and-OR.
Self-contained visualization. Each item costs exactly one left shift plus one OR over the whole bitset — processing 64 candidate sums per machine instruction (the /64 constant-factor win, not a Big-O change). See junior.md and professional.md for the proof that shift = "add w to every reachable sum at once".