You should definitely jump to C99, or newer(!). The C99 standard introduced
the restrict
keyword. Loosely speaking,
with this keyword you can inform the compiler that A[i]
and B[j]
do not access
the same memory location. In that case the compiler can generate better optimized code.
For example, it makes it easier for the compiler to auto-vectorize code. This is
essential for achieving high performance on today's CPUs, which usually support SIMD instruction sets
(such as Intel SSE/AVX, Arm NEON, PowerPC Altivec, etc.).
Citing the
restrict
Wikipedia page: The use of
the restrict keyword in C, in principle, allows non-obtuse C to achieve the
same performance as the same program written in Fortran.