What are the differences between using array offsets vs pointer incrementation?

后端 未结 11 1335
醉话见心
醉话见心 2021-02-06 13:39

Given 2 functions, which should be faster, if there is any difference at all? Assume that the input data is very large

void iterate1(const char* pIn, int Size)
{         


        
11条回答
  •  Happy的楠姐
    2021-02-06 14:19

    In the "other considerations" column, I'd say approach one is more clear. That's just my opinion though.

提交回复
热议问题