Spokes.wiki Search Graph Growth About

bit-manipulation-wiki

Log — Bit Manipulation Wiki

Append-only history. Each entry starts with ## [YYYY-MM-DD] <op> | <title> where <op> is ingest, query, lint, or split, so grep "^## \[" log.md | tail -5 works.

[2026-06-15] split | spoke spun out of the hub _inbox (low-level-programming cluster)

Created from a rapid Telegram burst (msgs 428–433) of bit-trick sources that crossed the HUB.md ≥3 spin-out threshold. Trigger cluster (≥3 distinct sources): bit-twiddling-hacks (Sean Anderson, Stanford — first parked in _inbox 2026-06-15, migrated here), count-set-bits-so (the canonical Stack Overflow popcount question), and two Stephan Brumme bits pages — xor-swap and branchless-abs. Scaffolded CLAUDE.md (domain header), spine files, and 9 wiki pages: 4 source summaries + 3 concepts (bit-manipulation, population-count, branchless-programming) + 2 author entities (sean-anderson, stephan-brumme). Registered in ../wikis.md; hub log split entry added; the _inbox/bithacks.md park record (and its low-level-programming cluster tag) is superseded by this spin-out and removed.

Notes: SO blocked automated fetch — count-set-bits-so written from established knowledge, flagged T3 + unfetched. The two bithacks Telegram sends (whole page + #CountBitsSetKernighan anchor) are one source, counted once; SO + the two Brumme pages are the other distinct sources. Thesis: bit tricks are branchless/SWAR technique whose performance edge is now mostly superseded by hardware instructions + compilers (the “elegant but obsolete” tension); durable value is correctness-critical bit work + understanding. Hacker’s Delight flagged as the top open T1/T2 gap.

[2026-06-15] ingest | Hacker’s Delight — closing the named book-gap (Ralph loop, ontology-guided)

Created hackers-delight (Book, T1) — Henry S. Warren Jr., Hacker’s Delight (Addison-Wesley 2002/2013), the field’s canonical/foundational text, cited by all the spoke’s other sources. Closes the synthesis “book-shaped gap” open question (flagged at spin-out as the top T1/T2 gap). Covers overflow, bit counting/rearranging, mask extraction, bit-matrix multiply, multiword arithmetic, and division-by-constants-via-multiply — the last sharpening the central thesis: it’s where many compiler bit-optimizations were first written down, so “the compiler wins now” = “the compiler absorbed Hacker’s Delight.” Linked from synthesis (open-q resolved), bit-manipulation concept, index (new Book section). Provenance: scope summarized from secondary sources (Wikipedia/foreword), not a full read — noted on page. +1 page (→10).

[2026-06-15] ingest | SWAR — concept page (Ralph loop, ontology-guided, synthesis-from-corpus)

Created swar (DefinedTerm) — SIMD Within A Register, referenced by bit-manipulation + population-count as a core technique but unpaged. The data-parallel half of the spoke (complement to branchless-programming‘s control-flow trick): a word as a vector of masked lanes; the parallel popcount mask-cascade IS SWAR. Synthesized from already-ingested sources (bit-twiddling-hacks, hackers-delight) — a concept page, no new external source (like branchless-programming). Linked from both referencing pages + index; partly resolves the synthesis “SWAR/SIMD depth” open question (SWAR’s niche = where true SIMD isn’t available). +1 page (→11).