Why the array index is faster than pointer? Isn\'t pointer supposed to be faster than array index?
** i used time.h clock_t to tested two functions, each loop 2 mil
I would suggest running each loop 200 million times, and then run each loop 10 times, and take the fastest measurement. That will factor out effects from OS scheduling and so on.
I would then suggest you disassemble the code for each loop.