📜 ⬆️ ⬇️

Comparing compilers for development on microcontrollers with ARM Cortex-M core


In this article, we will test the 3rd compiler for Kinetis microcontrollers with the ARM Cortex-M4 core.
Run tests CoreMark , Whetstone , Dhrystone .
We study compression algorithms with minimal RAM consumption and find out how different compilers affect their performance.
And even try to find out how far behind Kinetis is in speed from Intel Core I7 .




Previous articles about development on Kinetis microcontrollers:



In the article “Starting Development on Kinetis Microcontrollers. Quick start ” was described development environment Kinetis Design Studio v3.0.0 (KDS) . The KDS environment uses the GNU Tools for ARM Embedded Processors package as a compilation and software tool. There in particular includes the GCC compiler for ARM . The compiler is not bad in every sense. But if we see how many branches it has in the gcc.gnu.org/svn/gcc/branches directory, we will see more than 300 of them! How much strength is needed to maintain such a huge number of branches!? But the project is not commercial. On the other hand, the ARM Cortex-M series is not the mainstream, they are not used in smartphones, they don’t attract so much attention from the community that supports Open Source.
')
It makes you think, especially if you are going to be drawn into the long and exhausting programming of microcontrollers with megabytes of impenetrable sources, limited memory space, unknown requirements but with a lightning reaction to their changes.

Fortunately, KDS is provided with plugins for converting to other known compilation and build packages - Keil and IAR . Most demo projects for Kinetis are accompanied by 3 configurations for assembling using GCC , Keil and IAR . However, the Kinetis software suite does not have a sufficiently comprehensive test to compare these compilation tools with each other. So I had to create my own.
The project was created in KDS using the ProcessorExpert plug-in for the MK60FN1M0VLQ12 microcontroller on the board presented in the article “Smart Board for Controlling Power 3 Phase Loads”

Here is the project screen in KDS :


What is included in the test package


Project Whetstone . Very old and simple floating point performance test. The test is very easy to port and can be performed on the simplest microcontrollers. In our case, two implementations are presented: a variant of calculations with the type float and a variant with the type double . This is important because in the first case, a coprocessor is used in the Cortex-M4 , but not in the second.

Dhrystone project . Performance test of integer operations. The types float and double are not used anywhere. The test is also easily portable and there is a huge archive of results for all kinds of microcontrollers and computers.

Project CoreMark . Modern test, specially designed for embedded systems. It can become an industry standard. Its results are certified by the EEMBC organization, and therefore are protected to some extent from cheating and falsification.
The CoreMark test results are most credible with comprehensive microcontroller performance testing and compiler comparison. In principle, it could be limited to it, but the tests themselves do not have any practical benefit for embedded applications, and in order to give more practical significance to these tests, I also added testing of compression algorithms.

First I had to find a suitable memory manager (heap manager or heap).

Umm_malloc project . Found on Github . It seemed quite appropriate. The standard heap manager from the C library I refused to use for two reasons. First, in each of the Keil , IAR , GCC environments there will be its own library of heaps and did not want to spend time researching the features of each of them. Secondly, the compression algorithms are critically dependent on the amount of memory allocated to them. And memory to spare. We needed a mechanism to accurately control the allocated memory. And here umm_malloc provides this feature. And along the way, we will test the speed of the umm_malloc algorithm itself .

Compression algorithms


All algorithms had to be adjusted in order for them to use as little RAM as possible.
How much memory these algorithms need, how much data they can compress, and how fast their performance can be found in the test results and in the output listing in the terminal.

Here are the results:


-All optimizers option was enabled for all compilers. The exact composition of the options can be viewed in the attached project.
Compression algorithms compressed a portion of the binary code of the firmware obtained from the project of this test compiled in IAR.
-The compilation time of the GCC is measured when compiling from the KDS environment.
- In addition to the speed of the algorithms, the lines with additional important metrics for the developer are also included in the table: the time of complete recompilation of the project, the size of the binary file when optimizing for speed, and the size of the binary file when optimizing for size.

Output to the terminal of the test results compiled in IAR
----------- Speed Test ------------- Reference time = 100001 us ----------- umm malloc test ------------- ........................................................... |0x1fff1b44|B 0|NB 1|PB 0|Z 1|NF 1|PF 0|USED |0x1fff1b4c|B 1|NB 4223|PB 0|Z 4222|NF 4223|PF 0|FREE |0x1fff9f3c|B 4223|NB 0|PB 1|Z 1|NF 0|PF 1|USED ........................................................... Total Entries 1 Used Entries 0 Free Entries 1 Total Blocks 4223 Used Blocks 0 Free Blocks 4223 Used space = 0 Free space = 33784 ........................................................... umm malloc test time = 1447071 uS Allocations = 40000, uSec per allocation = 36 ----------- Compressor LZSS test ------------- Uncompressed size = 2048 Compressed size = 1858. Max. alloc.= 14384. Time = 6627 uS Decompress Max. alloc.= 1048. Time = 981 uS Decompress Ok! ----------- Compressor Zlib test ------------- Uncompressed size = 2048 Compressed size = 1740. Max. alloc.= 24288. Time = 12179 uS Decompress Max. alloc.= 15768. Time = 764 uS Decompress Ok! ----------- Compressor S-LZW test ------------- Uncompressed size = 2048 Compressed size = 2035. Max. alloc.= 4320. Time = 2542 uS Decompress Max. alloc.= 4320. Time = 3816 uS Decompress Ok! ----------- Compressor FastLZ test ------------- Uncompressed size = 2048 Compressed size = 1834. Max. alloc.= 32776. Time = 1010 uS Decompress Max. alloc.= 0. Time = 152 uS Decompress Ok! ----------- WHETSTONE FLOAT ------------- .........MODULE 1: simple identifiers... xx1 = -0.06679254770278930664 xx2 = -0.46633863449096679688 xx3 = -0.73303699493408203125 xx4 = -1.13254797458648681641 .........MODULE 2: array elements....... e10 = -0.06834230571985244751 e11 = -0.46263590455055236816 e12 = -0.72971796989440917969 e13 = -1.12397670745849609375 .........MODULE 3: array as parameter... e1_0 = -0.05533060804009437561 e1_1 = -0.44743216037750244141 e1_2 = -0.71096724271774291992 e1_3 = -1.10309338569641113281 .........MODULE 4: conditional jumps.... val = 1 .........MODULE 6: integer arithmetic... e1k = 6.00000000000000000000 e1l = 6.00000000000000000000 .........MODULE 7: trig. functions...... x1 = 0.49041154980659484863 y1 = 0.49039667844772338867 .........MODULE 8: procedure calls...... z = 0.99993747472763061523 .........MODULE9: array references...... e1_j = -1.10309338569641113281 e1_k = 3.00000000000000000000 e1_l = -1.10309338569641113281 .........MODULE10: integer arithmetic... j = 2 k = 3 .........MODULE11: standard functions... x = 0.83466047048568725586 ........................................ Whetstone last time (uS) = 10960.00 Whetstone max time (uS) = 10961.00 Whetstone min time (uS) = 10960.00 ----------- WHETSTONE DOUBLE ------------- .........MODULE 1: simple identifiers... xx1 = -0.06679268039452399826 xx2 = -0.46633881454398036003 xx3 = -0.73303694842681344599 xx4 = -1.13254799829068817198 .........MODULE 2: array elements....... e10 = -0.06834219862995164003 e11 = -0.46263765626356890425 e12 = -0.72971838784369053319 e13 = -1.12397907004612833261 .........MODULE 3: array as parameter... e1_0 = -0.05533645259179445915 e1_1 = -0.44743656275474680588 e1_2 = -0.71097338928518248722 e1_3 = -1.10309805692560095340 .........MODULE 4: conditional jumps.... val = 1 .........MODULE 6: integer arithmetic... e1k = 6.00000000000000000000 e1l = 6.00000000000000000000 .........MODULE 7: trig. functions...... x1 = 0.49040731615907084197 y1 = 0.49039249795612543821 .........MODULE 8: procedure calls...... z = 0.99993750062499996275 .........MODULE9: array references...... e1_j = -1.10309805692560095340 e1_k = 3.00000000000000000000 e1_l = -1.10309805692560095340 .........MODULE10: integer arithmetic... j = 2 k = 3 .........MODULE11: standard functions... x = 0.83466551951904967427 ........................................ Whetstone last time (uS) = 142583.00 Whetstone max time (uS) = 142583.00 Whetstone min time (uS) = 142582.00 ----------- DHRYSTONE 2 ------------- Dhrystone Benchmark, Version 2.1 (Language: C) Program compiled without 'register' attribute Execution starts, 20000 runs through Dhrystone Execution ends Final values of the variables used in the benchmark: Int_Glob: 5 should be: 5 Bool_Glob: 1 should be: 1 Ch_1_Glob: A should be: A Ch_2_Glob: B should be: B Arr_1_Glob[8]: 7 should be: 7 Arr_2_Glob[8][7]: 20010 should be: Number_Of_Runs + 10 Ptr_Glob-> Ptr_Comp: 536867932 should be: (implementation-dependent) Discr: 0 should be: 0 Enum_Comp: 2 should be: 2 Int_Comp: 17 should be: 17 Str_Comp: DHRYSTONE PROGRAM, SOME STRING should be: DHRYSTONE PROGRAM, SOME STRING Next_Ptr_Glob-> Ptr_Comp: 536867932 should be: (implementation-dependent), same as above Discr: 0 should be: 0 Enum_Comp: 1 should be: 1 Int_Comp: 18 should be: 18 Str_Comp: DHRYSTONE PROGRAM, SOME STRING should be: DHRYSTONE PROGRAM, SOME STRING Int_1_Loc: 5 should be: 5 Int_2_Loc: 13 should be: 13 Int_3_Loc: 7 should be: 7 Enum_Loc: 1 should be: 1 Str_1_Loc: DHRYSTONE PROGRAM, 1'ST STRING should be: DHRYSTONE PROGRAM, 1'ST STRING Str_2_Loc: DHRYSTONE PROGRAM, 2'ND STRING should be: DHRYSTONE PROGRAM, 2'ND STRING Time = 93000 us Microseconds for one run through Dhrystone: 4.65 Dhrystones per Second: 215053 ----------- COREMARK ------------- 2K performance run parameters for coremark. CoreMark Size : 666 Total ticks : 29079282 Total time (secs): 29.079282 Iterations/Sec : 343.887445 Iterations : 10000 Compiler version : IAR 7.40.7 Compiler flags : -O3 -Otime Memory location : IRAM seedcrc : 0xe9f5 [0]crclist : 0xe714 [0]crcmatrix : 0x1fd7 [0]crcstate : 0x8e3a [0]crcfinal : 0x988c Correct operation validated. See readme.txt for run and reporting rules. CoreMark 1.0 : 343.887445 / IAR 7.40.7 -O3 -Otime / IRAM END. 


Output to the terminal of the test results compiled in Keil
 ----------- Speed Test ------------- Reference time = 100001 us ----------- umm malloc test ------------- ........................................................... |0x1fff60f8|B 0|NB 1|PB 0|Z 1|NF 1|PF 0|USED |0x1fff6100|B 1|NB 4223|PB 0|Z 4222|NF 4223|PF 0|FREE |0x1fffe4f0|B 4223|NB 0|PB 1|Z 1|NF 0|PF 1|USED ........................................................... Total Entries 1 Used Entries 0 Free Entries 1 Total Blocks 4223 Used Blocks 0 Free Blocks 4223 Used space = 0 Free space = 33784 ........................................................... umm malloc test time = 1507118 uS Allocations = 40000, uSec per allocation = 37 ----------- Compressor LZSS test ------------- Uncompressed size = 2048 Compressed size = 1858. Max. alloc.= 14384. Time = 7406 uS Decompress Max. alloc.= 1048. Time = 989 uS Decompress Ok! ----------- Compressor Zlib test ------------- Uncompressed size = 2048 Compressed size = 1740. Max. alloc.= 24288. Time = 11716 uS Decompress Max. alloc.= 15768. Time = 912 uS Decompress Ok! ----------- Compressor S-LZW test ------------- Uncompressed size = 2048 Compressed size = 2035. Max. alloc.= 4320. Time = 2839 uS Decompress Max. alloc.= 4320. Time = 4194 uS Decompress Ok! ----------- Compressor FastLZ test ------------- Uncompressed size = 2048 Compressed size = 1834. Max. alloc.= 32776. Time = 1028 uS Decompress Max. alloc.= 0. Time = 160 uS Decompress Ok! ----------- WHETSTONE FLOAT ------------- .........MODULE 1: simple identifiers... xx1 = -0.06679254770278930700 xx2 = -0.46633863449096680000 xx3 = -0.73303699493408203000 xx4 = -1.13254797458648680000 .........MODULE 2: array elements....... e10 = -0.06834230571985244800 e11 = -0.46263590455055237000 e12 = -0.72971796989440918000 e13 = -1.12397670745849610000 .........MODULE 3: array as parameter... e1_0 = -0.05533060804009437600 e1_1 = -0.44743216037750244000 e1_2 = -0.71096724271774292000 e1_3 = -1.10309338569641110000 .........MODULE 4: conditional jumps.... val = 1 .........MODULE 6: integer arithmetic... e1k = 6.00000000000000000000 e1l = 6.00000000000000000000 .........MODULE 7: trig. functions...... x1 = 0.49040567874908447000 y1 = 0.49039086699485779000 .........MODULE 8: procedure calls...... z = 0.99993747472763062000 .........MODULE9: array references...... e1_j = -1.10309338569641110000 e1_k = 3.00000000000000000000 e1_l = -1.10309338569641110000 .........MODULE10: integer arithmetic... j = 2 k = 3 .........MODULE11: standard functions... x = 0.83466011285781860000 ........................................ Whetstone last time (uS) = 08925.00 Whetstone max time (uS) = 08926.00 Whetstone min time (uS) = 08925.00 ----------- WHETSTONE DOUBLE ------------- .........MODULE 1: simple identifiers... xx1 = -0.06679268039452399000 xx2 = -0.46633881454398041000 xx3 = -0.73303694842681344000 xx4 = -1.13254799829068810000 .........MODULE 2: array elements....... e10 = -0.06834219862995163900 e11 = -0.46263765626356895000 e12 = -0.72971838784369047000 e13 = -1.12397907004612830000 .........MODULE 3: array as parameter... e1_0 = -0.05533645259179446200 e1_1 = -0.44743656275474680000 e1_2 = -0.71097338928518250000 e1_3 = -1.10309805692560080000 .........MODULE 4: conditional jumps.... val = 1 .........MODULE 6: integer arithmetic... e1k = 6.00000000000000000000 e1l = 6.00000000000000000000 .........MODULE 7: trig. functions...... x1 = 0.49040731615903904000 y1 = 0.49039249795609352000 .........MODULE 8: procedure calls...... z = 0.99993750062499998000 .........MODULE9: array references...... e1_j = -1.10309805692560080000 e1_k = 3.00000000000000000000 e1_l = -1.10309805692560080000 .........MODULE10: integer arithmetic... j = 2 k = 3 .........MODULE11: standard functions... x = 0.83466551951905033000 ........................................ Whetstone last time (uS) = 166298.00 Whetstone max time (uS) = 166298.00 Whetstone min time (uS) = 166298.00 ----------- DHRYSTONE 2 ------------- Dhrystone Benchmark, Version 2.1 (Language: C) Program compiled without 'register' attribute Execution starts, 20000 runs through Dhrystone Execution ends Final values of the variables used in the benchmark: Int_Glob: 5 should be: 5 Bool_Glob: 1 should be: 1 Ch_1_Glob: A should be: A Ch_2_Glob: B should be: B Arr_1_Glob[8]: 7 should be: 7 Arr_2_Glob[8][7]: 20010 should be: Number_Of_Runs + 10 Ptr_Glob-> Ptr_Comp: 536870816 should be: (implementation-dependent) Discr: 0 should be: 0 Enum_Comp: 2 should be: 2 Int_Comp: 17 should be: 17 Str_Comp: DHRYSTONE PROGRAM, SOME STRING should be: DHRYSTONE PROGRAM, SOME STRING Next_Ptr_Glob-> Ptr_Comp: 536870816 should be: (implementation-dependent), same as above Discr: 0 should be: 0 Enum_Comp: 1 should be: 1 Int_Comp: 18 should be: 18 Str_Comp: DHRYSTONE PROGRAM, SOME STRING should be: DHRYSTONE PROGRAM, SOME STRING Int_1_Loc: 5 should be: 5 Int_2_Loc: 13 should be: 13 Int_3_Loc: 7 should be: 7 Enum_Loc: 1 should be: 1 Str_1_Loc: DHRYSTONE PROGRAM, 1'ST STRING should be: DHRYSTONE PROGRAM, 1'ST STRING Str_2_Loc: DHRYSTONE PROGRAM, 2'ND STRING should be: DHRYSTONE PROGRAM, 2'ND STRING Time = 91000 us Microseconds for one run through Dhrystone: 4.55 Dhrystones per Second: 219780 ----------- COREMARK ------------- 2K performance run parameters for coremark. CoreMark Size : 666 Total ticks : 37386523 Total time (secs): 37.386523 Iterations/Sec : 267.476064 Iterations : 10000 Compiler version : armcc V5.06 (build 20) Compiler flags : -O3 -Otime Memory location : IRAM seedcrc : 0xe9f5 [0]crclist : 0xe714 [0]crcmatrix : 0x1fd7 [0]crcstate : 0x8e3a [0]crcfinal : 0x988c Correct operation validated. See readme.txt for run and reporting rules. CoreMark 1.0 : 267.476064 / armcc V5.06 (build 20) -O3 -Otime / IRAM END. 


Output to the terminal of the test results compiled in GCC
 ----------- Speed Test ------------- Reference time = 100001 us ----------- umm malloc test ------------- ........................................................... |0x1fff5280|B 0|NB 1|PB 0|Z 1|NF 1|PF 0|USED |0x1fff5288|B 1|NB 4223|PB 0|Z 4222|NF 4223|PF 0|FREE |0x1fffd678|B 4223|NB 0|PB 1|Z 1|NF 0|PF 1|USED ........................................................... Total Entries 1 Used Entries 0 Free Entries 1 Total Blocks 4223 Used Blocks 0 Free Blocks 4223 Used space = 0 Free space = 33784 ........................................................... umm malloc test time = 983944 uS Allocations = 40000, uSec per allocation = 24 ----------- Compressor LZSS test ------------- Uncompressed size = 2048 Compressed size = 1858. Max. alloc.= 14384. Time = 8504 uS Decompress Max. alloc.= 1048. Time = 673 uS Decompress Ok! ----------- Compressor Zlib test ------------- Uncompressed size = 2048 Compressed size = 1740. Max. alloc.= 24288. Time = 12384 uS Decompress Max. alloc.= 15768. Time = 1070 uS Decompress Ok! ----------- Compressor S-LZW test ------------- Uncompressed size = 2048 Compressed size = 2035. Max. alloc.= 4320. Time = 2577 uS Decompress Max. alloc.= 4320. Time = 4189 uS Decompress Ok! ----------- Compressor FastLZ test ------------- Uncompressed size = 2048 Compressed size = 1834. Max. alloc.= 32776. Time = 1045 uS Decompress Max. alloc.= 0. Time = 234 uS Decompress Ok! ----------- WHETSTONE FLOAT ------------- .........MODULE 1: simple identifiers... xx1 = -0.06679254770278930664 xx2 = -0.46633863449096679688 xx3 = -0.73303699493408203125 xx4 = -1.13254797458648681641 .........MODULE 2: array elements....... e10 = -0.06834230571985244751 e11 = -0.46263590455055236816 e12 = -0.72971796989440917969 e13 = -1.12397670745849609375 .........MODULE 3: array as parameter... e1_0 = -0.05533138290047645569 e1_1 = -0.44743290543556213379 e1_2 = -0.71096915006637573242 e1_3 = -1.10309529304504394531 .........MODULE 4: conditional jumps.... val = 1 .........MODULE 6: integer arithmetic... e1k = 6.00000000000000000000 e1l = 6.00000000000000000000 .........MODULE 7: trig. functions...... x1 = 0.49040564894676208496 y1 = 0.49039086699485778809 .........MODULE 8: procedure calls...... z = 0.99993747472763061523 .........MODULE9: array references...... e1_j = -1.10309529304504394531 e1_k = 3.00000000000000000000 e1_l = -1.10309529304504394531 .........MODULE10: integer arithmetic... j = 2 k = 3 .........MODULE11: standard functions... x = 0.83466064929962158203 ........................................ Whetstone last time (uS) = 13629.00 Whetstone max time (uS) = 13630.00 Whetstone min time (uS) = 13629.00 ----------- WHETSTONE DOUBLE ------------- .........MODULE 1: simple identifiers... xx1 = -0.06679268039452398997 xx2 = -0.46633881454398040667 xx3 = -0.73303694842681343946 xx4 = -1.13254799829068808492 .........MODULE 2: array elements....... e10 = -0.06834219862995163930 e11 = -0.46263765626356895266 e12 = -0.72971838784369047470 e13 = -1.12397907004612829240 .........MODULE 3: array as parameter... e1_0 = -0.05533645259179446191 e1_1 = -0.44743656275474680273 e1_2 = -0.71097338928518249990 e1_3 = -1.10309805692560081170 .........MODULE 4: conditional jumps.... val = 1 .........MODULE 6: integer arithmetic... e1k = 6.00000000000000000000 e1l = 6.00000000000000000000 .........MODULE 7: trig. functions...... x1 = 0.49040731615904653573 y1 = 0.49039249795610123650 .........MODULE 8: procedure calls...... z = 0.99993750062499997533 .........MODULE9: array references...... e1_j = -1.10309805692560081170 e1_k = 3.00000000000000000000 e1_l = -1.10309805692560081170 .........MODULE10: integer arithmetic... j = 2 k = 3 .........MODULE11: standard functions... x = 0.83466551951905032514 ........................................ Whetstone last time (uS) = 219895.00 Whetstone max time (uS) = 219895.00 Whetstone min time (uS) = 219894.00 ----------- DHRYSTONE 2 ------------- Dhrystone Benchmark, Version 2.1 (Language: C) Program compiled without 'register' attribute Execution starts, 20000 runs through Dhrystone Execution ends Final values of the variables used in the benchmark: Int_Glob: 5 should be: 5 Bool_Glob: 1 should be: 1 Ch_1_Glob: A should be: A Ch_2_Glob: B should be: B Arr_1_Glob[8]: 7 should be: 7 Arr_2_Glob[8][7]: 20010 should be: Number_Of_Runs + 10 Ptr_Glob-> Ptr_Comp: 536870792 should be: (implementation-dependent) Discr: 0 should be: 0 Enum_Comp: 2 should be: 2 Int_Comp: 17 should be: 17 Str_Comp: DHRYSTONE PROGRAM, SOME STRING should be: DHRYSTONE PROGRAM, SOME STRING Next_Ptr_Glob-> Ptr_Comp: 536870792 should be: (implementation-dependent), same as above Discr: 0 should be: 0 Enum_Comp: 1 should be: 1 Int_Comp: 18 should be: 18 Str_Comp: DHRYSTONE PROGRAM, SOME STRING should be: DHRYSTONE PROGRAM, SOME STRING Int_1_Loc: 5 should be: 5 Int_2_Loc: 13 should be: 13 Int_3_Loc: 7 should be: 7 Enum_Loc: 1 should be: 1 Str_1_Loc: DHRYSTONE PROGRAM, 1'ST STRING should be: DHRYSTONE PROGRAM, 1'ST STRING Str_2_Loc: DHRYSTONE PROGRAM, 2'ND STRING should be: DHRYSTONE PROGRAM, 2'ND STRING Time = 74000 us Microseconds for one run through Dhrystone: 3.70 Dhrystones per Second: 270270 ----------- COREMARK ------------- 2K performance run parameters for coremark. CoreMark Size : 666 Total ticks : 45291107 Total time (secs): 45.291107 Iterations/Sec : 220.793897 Iterations : 10000 Compiler version : GCC4.8.4 20140725 (release) [ARM/embedded-4_8-branch revision 213147] Compiler flags : -O3 -Otime Memory location : IRAM seedcrc : 0xe9f5 [0]crclist : 0xe714 [0]crcmatrix : 0x1fd7 [0]crcstate : 0x8e3a [0]crcfinal : 0x988c Correct operation validated. See readme.txt for run and reporting rules. CoreMark 1.0 : 220.793897 / GCC4.8.4 20140725 (release) [ARM/embedded-4_8-branch revision 213147] -O3 -Otime / IRAM END. 


Output to the terminal of test results launched in Visual Studio 2015
 ----------- Speed Test ------------- Reference time = 100000 us ----------- umm malloc test ------------- ........................................................... |0x00ba5980|B 0|NB 1|PB 0|Z 1|NF 1|PF 0|USED |0x00ba5988|B 1|NB 4223|PB 0|Z 4222|NF 4223|PF 0|FREE |0x00badd78|B 4223|NB 0|PB 1|Z 1|NF 0|PF 1|USED ........................................................... Total Entries 1 Used Entries 0 Free Entries 1 Total Blocks 4223 Used Blocks 0 Free Blocks 4223 Used space = 0 Free space = 33784 ........................................................... umm malloc test time = 13586 uS Allocations = 40000, uSec per allocation = 0 ----------- Compressor LZSS test ------------- Uncompressed size = 2048 Compressed size = 1858. Max. alloc.= 14384. Time = 146 uS Decompress Max. alloc.= 1048. Time = 10 uS Decompress Ok! ----------- Compressor Zlib test ------------- Uncompressed size = 2048 Compressed size = 1740. Max. alloc.= 24288. Time = 241 uS Decompress Max. alloc.= 15768. Time = 20 uS Decompress Ok! ----------- Compressor S-LZW test ------------- Uncompressed size = 2048 Compressed size = 2035. Max. alloc.= 4320. Time = 47 uS Decompress Max. alloc.= 4320. Time = 31 uS Decompress Ok! ----------- Compressor FastLZ test ------------- Uncompressed size = 2048 Compressed size = 1834. Max. alloc.= 32776. Time = 13 uS Decompress Max. alloc.= 0. Time = 4 uS Decompress Ok! ----------- WHETSTONE FLOAT ------------- .........MODULE 1: simple identifiers... xx1 = -0.06679254770278930700 xx2 = -0.46633863449096680000 xx3 = -0.73303699493408203000 xx4 = -1.13254797458648680000 .........MODULE 2: array elements....... e10 = -0.06834230571985244800 e11 = -0.46263590455055237000 e12 = -0.72971796989440918000 e13 = -1.12397670745849610000 .........MODULE 3: array as parameter... e1_0 = -0.05533060804009437600 e1_1 = -0.44743216037750244000 e1_2 = -0.71096724271774292000 e1_3 = -1.10309338569641110000 .........MODULE 4: conditional jumps.... val = 1 .........MODULE 6: integer arithmetic... e1k = 6.00000000000000000000 e1l = 6.00000000000000000000 .........MODULE 7: trig. functions...... x1 = 0.49040612578392029000 y1 = 0.49039128422737122000 .........MODULE 8: procedure calls...... z = 0.99993747472763062000 .........MODULE9: array references...... e1_j = -1.10309338569641110000 e1_k = 3.00000000000000000000 e1_l = -1.10309338569641110000 .........MODULE10: integer arithmetic... j = 2 k = 3 .........MODULE11: standard functions... x = 0.83466225862503052000 ........................................ Whetstone last time (uS) = 00131.00 Whetstone max time (uS) = 00168.00 Whetstone min time (uS) = 00123.00 ----------- WHETSTONE DOUBLE ------------- .........MODULE 1: simple identifiers... xx1 = -0.06679268039452399000 xx2 = -0.46633881454398041000 xx3 = -0.73303694842681344000 xx4 = -1.13254799829068810000 .........MODULE 2: array elements....... e10 = -0.06834219862995163900 e11 = -0.46263765626356895000 e12 = -0.72971838784369047000 e13 = -1.12397907004612830000 .........MODULE 3: array as parameter... e1_0 = -0.05533645259179446200 e1_1 = -0.44743656275474680000 e1_2 = -0.71097338928518250000 e1_3 = -1.10309805692560080000 .........MODULE 4: conditional jumps.... val = 1 .........MODULE 6: integer arithmetic... e1k = 6.00000000000000000000 e1l = 6.00000000000000000000 .........MODULE 7: trig. functions...... x1 = 0.49040731615904543000 y1 = 0.49039249795610007000 .........MODULE 8: procedure calls...... z = 0.99993750062499998000 .........MODULE9: array references...... e1_j = -1.10309805692560080000 e1_k = 3.00000000000000000000 e1_l = -1.10309805692560080000 .........MODULE10: integer arithmetic... j = 2 k = 3 .........MODULE11: standard functions... x = 0.83466551951905787000 ........................................ Whetstone last time (uS) = 00152.00 Whetstone max time (uS) = 00186.00 Whetstone min time (uS) = 00142.00 ----------- DHRYSTONE 2 ------------- Dhrystone Benchmark, Version 2.1 (Language: C) Program compiled without 'register' attribute Execution starts, 20000 runs through Dhrystone Execution ends Final values of the variables used in the benchmark: Int_Glob: 5 should be: 5 Bool_Glob: 1 should be: 1 Ch_1_Glob: A should be: A Ch_2_Glob: B should be: B Arr_1_Glob[8]: 7 should be: 7 Arr_2_Glob[8][7]: 20010 should be: Number_Of_Runs + 10 Ptr_Glob-> Ptr_Comp: 3602560 should be: (implementation-dependent) Discr: 0 should be: 0 Enum_Comp: 2 should be: 2 Int_Comp: 17 should be: 17 Str_Comp: DHRYSTONE PROGRAM, SOME STRING should be: DHRYSTONE PROGRAM, SOME STRING Next_Ptr_Glob-> Ptr_Comp: 3602560 should be: (implementation-dependent), same as above Discr: 0 should be: 0 Enum_Comp: 1 should be: 1 Int_Comp: 18 should be: 18 Str_Comp: DHRYSTONE PROGRAM, SOME STRING should be: DHRYSTONE PROGRAM, SOME STRING Int_1_Loc: 5 should be: 5 Int_2_Loc: 13 should be: 13 Int_3_Loc: 7 should be: 7 Enum_Loc: 1 should be: 1 Str_1_Loc: DHRYSTONE PROGRAM, 1'ST STRING should be: DHRYSTONE PROGRAM, 1'ST STRING Str_2_Loc: DHRYSTONE PROGRAM, 2'ND STRING should be: DHRYSTONE PROGRAM, 2'ND STRING Time = 551 us Microseconds for one run through Dhrystone: 0.03 Dhrystones per Second: 36297640 ----------- COREMARK ------------- 2K performance run parameters for coremark. CoreMark Size : 666 Total ticks : 11012043 Total time (secs): 11.012043 Iterations/Sec : 9080.967083 Iterations : 100000 Compiler version : VS 2013 Compiler flags : -O3 -Otime Memory location : IRAM seedcrc : 0xe9f5 [0]crclist : 0xe714 [0]crcmatrix : 0x1fd7 [0]crcstate : 0x8e3a [0]crcfinal : 0xd340 Correct operation validated. See readme.txt for run and reporting rules. CoreMark 1.0 : 9080.967083 / VS 2015 -O3 -Otime / IRAM END. 



How did Intel Core i7 turn out?


The fact is that all the compression algorithms and the memory manager were debugged in the Visual Studio environment and this is the processor of my computer. The archive has a directory SpeedTest_VS, which contains a project for Visual Studio 2015 and in which you can, if you wish, continue to improve these algorithms.

Conclusion


IAR was the undisputed leader in the ranking. Most surprisingly, while maintaining the effectiveness of the IAR code is also a leader in compiling speed. The spoon of tar left unaccounted here is that IAR comes with quite a bit of a functional source editor. You can of course run the compilation with IAR tools directly from the KDS environment, since KDS is the same slightly modified Eclipse version of Mylyn . But the recompilation time then increases to 2 minutes! Eclipse also has a flaw, it opens slowly, with some source size, context parsing starts to slow down. In the draft of this test there is a directory SpeedTest_SE . This file contains the SpeedTest.vpw file for the test project’s workspace for the SlickEdit editor. SlickEdit is a great, very fast editor, and IAR IDE can automatically track file changes, so there’s no problem sharing them.

The full archive of the project (97.7 MB) is available at https://drive.google.com/file/d/0B5dbvc_yPqJHYWI0OE9YZklKRjQ/view?usp=sharing

Source: https://habr.com/ru/post/368779/


All Articles