Structured RAM Hamming-weight program — definitions #
The benchmark uses a small reserved-register ABI: registers R₀ through R₄
hold loop state and input bits start at R₅. This avoids the existing raw RAM
input convention's overlap between an unbounded input and fixed scratch registers.
Remaining input length and final-result register.
Equations
Instances For
Hamming-weight accumulator register.
Equations
Instances For
Address of the next input bit.
Equations
Instances For
Constant-one register used for increments and decrements.
Equations
Instances For
Temporary register receiving the current input bit.
Equations
Instances For
First register occupied by input data under the reserved-register ABI.
Equations
Instances For
Natural-number representation of one input bit.
Equations
Instances For
Mathematical Hamming weight of a Boolean list.
Equations
Instances For
Reserved-register input layout for the structured benchmark.
Equations
Instances For
Basic instructions that initialize the accumulator, input pointer, and constant-one register.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Initialize the Hamming loop registers.
Equations
Instances For
One Hamming-weight loop iteration.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Process input bits until the remaining-length register reaches zero.
Equations
Instances For
Copy the accumulator to the result register R₀.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Complete structured Hamming-weight program.
Equations
Instances For
Concrete compiled RAM program for Hamming weight.
Equations
Instances For
Exact number of target RAM transitions needed to reach the compiled halt instruction. A zero bit uses six loop transitions and a one bit uses eight.
Equations
- Complexity.RAM.Structured.Hamming.stepCount bits = 6 + 6 * bits.length + 2 * Complexity.RAM.Structured.Hamming.weight bits
Instances For
Explicit logarithmic-cost time budget as a function of input length. The
constant is deliberately simple: the important content is the linear number
of operations, each on values of O(bitlen n) bits.
Equations
- Complexity.RAM.Structured.Hamming.timeBound inputLength = 64 * (inputLength + 1) * (Complexity.RAM.bitlen (inputLength + 5) + 1)
Instances For
Explicit peak-space budget for the reserved-register input representation.
There are at most inputLength + 5 nonzero registers, and both an occupied
register index and its value have at most bitlen (inputLength + 5) bits.
Equations
- Complexity.RAM.Structured.Hamming.spaceBound inputLength = (inputLength + 5) * (2 * Complexity.RAM.bitlen (inputLength + 5))
Instances For
A shifted n · bitlen n comparison function used to state the benchmark's
quasilinear time and space bounds without hiding small-input behavior.
Equations
- Complexity.RAM.Structured.Hamming.quasilinearBound inputLength = (inputLength + 5) * (Complexity.RAM.bitlen (inputLength + 5) + 1)