There's this assembly excerpt :
movl (%ecx,%edx,4), %eax
...
incl %eax
movl %eax, (%ecx,%edx,4)
Which translates into c :
a[i] += 1;
With:
a -> ecx and i -> edx
My question is what's the point of using eax as a middleman ? Is it faster or is it impossible to increment the memory value directly ?