This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

C6748计算时间优化问题



有如下一段代码 放在C6748 片外RAM 中

int i,j,sum[300];

for(i=pcf->rowTop;i<pcf->rowBottom;i++)

{    for(j=pcf->colLeft;j<pcf->colRight;j++)

    {    sum[i-pcf->Top]+=img[640*i+j] }

}

以上代码中

 rowBottom-rowTop~=[250,300]  ,

 colRight-colLeft~=[250,300]    ,

img 为图像数组 8bit

以上代码在400M 的C6748   开启O3编译优化 跑了 1734us。

不知以上代码是否还有优化空间,如何优化呢。