  We provide a general framework for constructing digital dynamical decoupling
sequences based on Walsh modulation --- applicable to arbitrary qubit
decoherence scenarios. By establishing equivalence between decoupling design
based on Walsh functions and on concatenated projections, we identify a family
of {\em optimal Walsh sequences}, which can be exponentially more efficient, in
terms of the required total pulse number, for fixed cancellation order, than
known digital sequences based on concatenated design. Optimal sequences for a
given cancellation order are highly non-unique --- their performance depending
sensitively on the control path. We provide an analytic upper bound to the
achievable decoupling error, and show how sequences within the optimal Walsh
family can substantially outperform concatenated decoupling, while respecting
realistic timing constraints. We validate these conclusions by numerically
computing the average fidelity in a toy model capturing the essential feature
of hyperfine-induced decoherence in a quantum dot.
