Re:Numbering should start at zero: E.W. Dijkstra
by hn_throwaway_99 on Friday March 21, 2025 @09:35AM
(#43435518)
The comment you are replying to essentially said exactly that:
> but always assumed it traces back to memory offsets in an array rather than any principled stance because 0-counting sequences represents a crazy choice.
Assuming `a` is the address of the beginning of the array, the 0-based indexing on the left is equivalent to the memory access on the right (I'm using C syntax here):
For 1-based indexing: This extra "-1" costs some performance (through it can be optimized-away in some cases).