Mail:bookworepeng@Hotmail.com
phone:18575593141
Platform:
Zynq ZP20 开发板
WINCE 7.0(windows embedded compact 7 )
测试代码:
#include "stdafx.h"
int _tmain(int argc, _TCHAR* argv[])
{
int start_count = 0;
int end_count = 0;
int for_end = 20000;
start_count = GetTickCount();
for(int i = 0; i < for_end; i++)
{
for(int k = 0;k < for_end; k++)
{
int t = 100;
int t1 = t;
int t3 = t+t1;
}
}
end_count = GetTickCount();
int total = end_count - start_count;
return 0;
}
866MHz 上述代码运行时间为 9220 ms
666MHz 上述代码运行时间为12667 ms
866 / 666 = 1.3
12667 / 9220 = 1.373
结论:CPU 核心频率 和代码运行效率基本成正比例关系
分析:DDR clock 没有变化
CACHE 和 arm core 时钟有提高
可能是上述两种原因导致不是完全的比例关系,但是还没有想到什么实验手段验证(欢迎补充)