cpu性能测试 CoreMark
CoreMark简介
- CoreMark是由EEMBC(Embedded Microprocessor Benchmark Consortium)的Shay Gla-On于2009年提出的一项基准测试程序,CoreMark的主要目标是简化操作,并提供一套测试单核处理器核心的方法。测试标准是在配置参数的组合下单位时间内运行的CoreMark程序次数(单位:CoreMark/MHz),该数字值越大则说明测试的性能越好。
- 目前在嵌入式CPU行业中普遍公认的性能测试指标的标准主要使用以下三种,MIPS、Dhrystone、Coremark,而CoreMark与Dhrystone一样,拥有体积小、方便移植、易于理解、免费并且显示单个数字基准分数。与Dhrystone不同的是,Dhrystone的主要部分实际上暴露了编译器优化工作负载的能力,而不是实际MCU或CPU的能力,的性能,而CoreMark具有特定的运行和报告规则,从而可以避免由于所使用的编译库不同而导致的测试结果难以比较。
编译
make
多核编译,按实际核数配置MULTITHREAD=
make XCFLAGS="-DMULTITHREAD=4 -DUSE_PTHREAD -pthread"
使用
设备型号 | freq | CoreMark | cores |
---|---|---|---|
Raspberry Pi 4 Model B Rev 1.4 BCM2835 | 1.5GHz | 26600 | 4 |
Raspberry Pi 4 Model B Rev 1.4 BCM2835 | 2.0GHz | 44074 | 4 |
NanoPC-T4 rk3399 | 2.0GHz/1.4GHz | 33185 | 6 |
Jetson Xavier NX | 1.42GHz | 67746 | 6 |
工板 Intel(R) Celeron(R) CPU J1900 @ 1.99GHz | 24206 | 4 | |
ThinkPad T440P Intel(R) Core(TM) i7-4810MQ CPU @ 2.80GHz | 114893 | 8 |
sudo cat /sys/devices/system/cpu/cpu*/cpufreq/cpuinfo_cur_freq
BCM2835 4核跑分
$ ./coremark.exe
2K performance run parameters for coremark.
CoreMark Size : 666
Total ticks : 18151
Total time (secs): 18.151000
Iterations/Sec : 44074.706628
Iterations : 800000
Compiler version : GCC8.3.0
Compiler flags : -O2 -DMULTITHREAD=4 -DUSE_PTHREAD -pthread -DPERFORMANCE_RUN=1 -lrt
Parallel PThreads : 4
Memory location : Please put data memory location here
(e.g. code in flash, data on heap etc)
seedcrc : 0xe9f5
[0]crclist : 0xe714
[1]crclist : 0xe714
[2]crclist : 0xe714
[3]crclist : 0xe714
[0]crcmatrix : 0x1fd7
[1]crcmatrix : 0x1fd7
[2]crcmatrix : 0x1fd7
[3]crcmatrix : 0x1fd7
[0]crcstate : 0x8e3a
[1]crcstate : 0x8e3a
[2]crcstate : 0x8e3a
[3]crcstate : 0x8e3a
[0]crcfinal : 0x4983
[1]crcfinal : 0x4983
[2]crcfinal : 0x4983
[3]crcfinal : 0x4983
Correct operation validated. See README.md for run and reporting rules.
CoreMark 1.0 : 44074.706628 / GCC8.3.0 -O2 -DMULTITHREAD=4 -DUSE_PTHREAD -pthread -DPERFORMANCE_RUN=1 -lrt / Heap / 4:PThreads
rk3399 6核跑分
$ ./coremark.exe
2K performance run parameters for coremark.
CoreMark Size : 666
Total ticks : 36160
Total time (secs): 36.160000
Iterations/Sec : 33185.840708
Iterations : 1200000
Compiler version : GCC7.5.0
Compiler flags : -O2 -DMULTITHREAD=6 -DUSE_PTHREAD -pthread -DPERFORMANCE_RUN=1 -lrt
Parallel PThreads : 6
Memory location : Please put data memory location here
(e.g. code in flash, data on heap etc)
seedcrc : 0xe9f5
[0]crclist : 0xe714
[1]crclist : 0xe714
[2]crclist : 0xe714
[3]crclist : 0xe714
[4]crclist : 0xe714
[5]crclist : 0xe714
[0]crcmatrix : 0x1fd7
[1]crcmatrix : 0x1fd7
[2]crcmatrix : 0x1fd7
[3]crcmatrix : 0x1fd7
[4]crcmatrix : 0x1fd7
[5]crcmatrix : 0x1fd7
[0]crcstate : 0x8e3a
[1]crcstate : 0x8e3a
[2]crcstate : 0x8e3a
[3]crcstate : 0x8e3a
[4]crcstate : 0x8e3a
[5]crcstate : 0x8e3a
[0]crcfinal : 0x4983
[1]crcfinal : 0x4983
[2]crcfinal : 0x4983
[3]crcfinal : 0x4983
[4]crcfinal : 0x4983
[5]crcfinal : 0x4983
Correct operation validated. See README.md for run and reporting rules.
CoreMark 1.0 : 33185.840708 / GCC7.5.0 -O2 -DMULTITHREAD=6 -DUSE_PTHREAD -pthread -DPERFORMANCE_RUN=1 -lrt / Heap / 6:PThreads
Intel(R) Core(TM) i7-4810MQ CPU @ 2.80GHz 8核跑分
$ ./coremark.exe
2K performance run parameters for coremark.
CoreMark Size : 666
Total ticks : 27852
Total time (secs): 27.852000
Iterations/Sec : 114893.005888
Iterations : 3200000
Compiler version : GCC10.2.1 20210110
Compiler flags : -O2 -DMULTITHREAD=8 -DUSE_PTHREAD -pthread -DPERFORMANCE_RUN=1 -lrt
Parallel PThreads : 8
Memory location : Please put data memory location here
(e.g. code in flash, data on heap etc)
seedcrc : 0xe9f5
[0]crclist : 0xe714
[1]crclist : 0xe714
[2]crclist : 0xe714
[3]crclist : 0xe714
[4]crclist : 0xe714
[5]crclist : 0xe714
[6]crclist : 0xe714
[7]crclist : 0xe714
[0]crcmatrix : 0x1fd7
[1]crcmatrix : 0x1fd7
[2]crcmatrix : 0x1fd7
[3]crcmatrix : 0x1fd7
[4]crcmatrix : 0x1fd7
[5]crcmatrix : 0x1fd7
[6]crcmatrix : 0x1fd7
[7]crcmatrix : 0x1fd7
[0]crcstate : 0x8e3a
[1]crcstate : 0x8e3a
[2]crcstate : 0x8e3a
[3]crcstate : 0x8e3a
[4]crcstate : 0x8e3a
[5]crcstate : 0x8e3a
[6]crcstate : 0x8e3a
[7]crcstate : 0x8e3a
[0]crcfinal : 0x65c5
[1]crcfinal : 0x65c5
[2]crcfinal : 0x65c5
[3]crcfinal : 0x65c5
[4]crcfinal : 0x65c5
[5]crcfinal : 0x65c5
[6]crcfinal : 0x65c5
[7]crcfinal : 0x65c5
Correct operation validated. See README.md for run and reporting rules.
CoreMark 1.0 : 114893.005888 / GCC10.2.1 20210110 -O2 -DMULTITHREAD=8 -DUSE_PTHREAD -pthread -DPERFORMANCE_RUN=1 -lrt / Heap / 8:PThreads
Intel(R) Celeron(R) CPU J1900 @ 1.99GHz 4核
$ ./coremark.exe
2K performance run parameters for coremark.
CoreMark Size : 666
Total ticks : 18177
Total time (secs): 18.177000
Iterations/Sec : 24206.414700
Iterations : 440000
Compiler version : GCC4.8.5 20150623 (Red Hat 4.8.5-44)
Compiler flags : -O2 -DMULTITHREAD=4 -DUSE_PTHREAD -pthread -DPERFORMANCE_RUN=1 -lrt
Parallel PThreads : 4
Memory location : Please put data memory location here
(e.g. code in flash, data on heap etc)
seedcrc : 0xe9f5
[0]crclist : 0xe714
[1]crclist : 0xe714
[2]crclist : 0xe714
[3]crclist : 0xe714
[0]crcmatrix : 0x1fd7
[1]crcmatrix : 0x1fd7
[2]crcmatrix : 0x1fd7
[3]crcmatrix : 0x1fd7
[0]crcstate : 0x8e3a
[1]crcstate : 0x8e3a
[2]crcstate : 0x8e3a
[3]crcstate : 0x8e3a
[0]crcfinal : 0x33ff
[1]crcfinal : 0x33ff
[2]crcfinal : 0x33ff
[3]crcfinal : 0x33ff
Correct operation validated. See README.md for run and reporting rules.
CoreMark 1.0 : 24206.414700 / GCC4.8.5 20150623 (Red Hat 4.8.5-44) -O2 -DMULTITHREAD=4 -DUSE_PTHREAD -pthread -DPERFORMANCE_RUN=1 -lrt / Heap / 4:PThreads