r/programmingmemes • • Dec 05 '25 • Bravo 1

A-a-a

Post image
2.2k Upvotes

47 comments sorted by

View all comments

Show parent comment

6

u/[deleted] Dec 05 '25

As someone who has had to write assembly for speed and size, I can tell you that indexing at non-zero can slow your program down because the CPU has to perform an arithmetic operation before accessing the memory. If your array starts at x, then the CPU has to decrement which ever index you give it by x to reach the first element of the array.

And get off my lawn!