3 ms·
Well you've either got: memory_address + array_width*i + j or memory_address + array_width*(i-1) + (j-1) = (memory_address-array_width-1)+ array_width*i + j
by contravariant 4y ago
Well you've either got:
memory_address + array_width*i + j
or
memory_address + array_width*(i-1) + (j-1) = (memory_address-array_width-1)+ array_width*i + j
so you can just absorb the extra computation into the pointer.