News for hackers. Stuff that matters.
Re:Again on 0-based vs. 1-based indexing by professoretc on Wednesday January 20, 2021 @02:09PM (#25850537)
> No, it mostly affects execution time.

That's what I was thinking, too, but most of the time (even if the index is not static) the -1 can be eliminated by just modifying the address at which the array is assumed to start. That is,

    arr[x]
compiles into an access at address

    (arr - 1) + x
Since the address of arr is statically known, arr - 1 is, too, and the address of "one before the first element" will be what's written as the base for the memory access.
Re:Again on 0-based vs. 1-based indexing by adwn on Wednesday January 20, 2021 @03:06PM (#25851262)
> Since the address of arr is statically known [...]

No, that's almost never the case – only when accessing a static array. Typically, that restricts it to static look-up tables and very simple embedded systems.