Stm8 code size
Note: There is another comparison of compilers targeting the STM8, that uses standard benchmarks and also considers other aspects, such as standard compliance and code speed.
A history of code size in sdcc and a comparison to other compilers.
Note: these benchmarks are not representative. The files were originally chosen as examples of source for which SDCC generates particularly bad code compared to other compilers (that was quite a while ago, before SDCC even had a stm8 backend); the purpose of the table is mostly to see the progress of SDCC.
STM8 code size comparison (bytes):
|File||Cosmic C¹||IAR C²||sdcc 3.4.0³||sdcc 3.6.0³||sdcc 3.6.9 #10107³|
The benchmark files can be found at http://colecovision.eu/stuff/testbench.tar.gz
All compilers have been configured for strong optimization for code size.
¹ C Compiler for STM8 (COSMIC Software); Generator V4.3.7; Optimizer V4.3.6. Current version as of mid-2013.
² IAR C/C++ Compiler V126.96.36.199106 for STM8. Current version as of mid-2013.
³ Compiler options --opt-code-size --max-allocs-per-node 10000000
This is a list of feature requests, that combined will probably get code size down near to the level of the non-free compilers.