Difference between revisions of "Stm8 code size"

From SDCC wiki
Jump to: navigation, search
m (Updated current data)
(Updated Cosmic C data, added IAR data.)
Line 4: Line 4:
 
{| border=1 class="simple"
 
{| border=1 class="simple"
 
! File  
 
! File  
! Cosmic C²
+
! Cosmic
 +
! IAR
 
! sdcc-stm8 #8537
 
! sdcc-stm8 #8537
 
! sdcc #8820³
 
! sdcc #8820³
 
|-  
 
|-  
 
|  cvu_vinb.c  
 
|  cvu_vinb.c  
|  '''7'''
+
|  '''6'''
 +
|  '''6'''
 
|  15
 
|  15
 
|  11
 
|  11
 
|-  
 
|-  
 
|  galois_lfsr.c  
 
|  galois_lfsr.c  
21
+
'''15'''
 +
|  '''15'''
 
|  34
 
|  34
'''20'''
+
|  20
 
|-  
 
|-  
 
|  get_tile.c  
 
|  get_tile.c  
95
+
89
 +
|  '''87'''
 
|  129
 
|  129
'''90'''
+
|  90
 
|-  
 
|-  
 
|  huffman_iterative.c  
 
|  huffman_iterative.c  
161
+
'''134'''
 +
|  171
 
|  323
 
|  323
'''156'''
+
|  156
 
|-  
 
|-  
 
|  huffman_recursive.c  
 
|  huffman_recursive.c  
198
+
'''140'''
 +
|  168
 
|  358
 
|  358
'''195'''
+
|  195
 
|-  
 
|-  
 
|  init_loop.c  
 
|  init_loop.c  
33
+
'''24'''
 +
|  31
 
|  69
 
|  69
'''30'''
+
|  30
 
|-  
 
|-  
 
|  insertion_sort.c  
 
|  insertion_sort.c  
|  '''108'''
+
|  '''92'''
 +
|  111
 
|  247
 
|  247
 
|  137
 
|  137
 
|-  
 
|-  
 
|  memcpy_compression.c  
 
|  memcpy_compression.c  
|  '''31'''
+
|  '''43'''
 +
|  54
 
|  93
 
|  93
 
|  66
 
|  66
 
|-  
 
|-  
 
|  memtovmemcpy.c  
 
|  memtovmemcpy.c  
|  '''30'''
+
|  '''44'''
 +
|  55
 
|  101
 
|  101
 
|  55
 
|  55
 
|-  
 
|-  
 
|  play_music.c  
 
|  play_music.c  
393
+
354
 +
|  '''290'''
 
|  721
 
|  721
'''357'''
+
|  357
 
|-  
 
|-  
 
|  sdcc_mullong.c  
 
|  sdcc_mullong.c  
|  '''132'''
+
|  '''127'''
 +
|  179
 
|  673
 
|  673
 
|  348
 
|  348
 
|-  
 
|-  
 
|  set_screen_mode.c  
 
|  set_screen_mode.c  
 +
|  '''49'''
 
|  '''49'''
 
|  '''49'''
 
|  75
 
|  75
Line 69: Line 82:
 
|-  
 
|-  
 
|  set_sprite_x.c  
 
|  set_sprite_x.c  
|  '''66'''
+
|  '''55'''
 +
|  65
 
|  152
 
|  152
'''66'''
+
|  66
 
|-  
 
|-  
 
|  z88dk-mktime.c  
 
|  z88dk-mktime.c  
|  '''239'''
+
|  221
 +
|  '''209'''
 
|  618
 
|  618
 
|  404
 
|  404
 
|-  
 
|-  
 
|  total  
 
|  total  
|  '''1563'''
+
|  '''1393'''
 +
|  1490
 
|  3609
 
|  3609
 
|  1998
 
|  1998
Line 87: Line 103:
 
The benchmark files can be found at http://colecovision.eu/stuff/testbench.tar.gz
 
The benchmark files can be found at http://colecovision.eu/stuff/testbench.tar.gz
  
² C Compiler for STM8 (COSMIC Software); Generator V4.3.4 - 23 Mar 2010
+
All compilers have been configured for strong optimization for code size.
 
+
¹ C Compiler for STM8 (COSMIC Software); Generator V4.3.7 - 29 Nov 2011; Optimizer V4.3.6 - 29 Nov 2011.
 +
² IAR C/C++ Compiler V1.40.1.50106 for STM8 21/Sep/2013
 
³ --opt-code-size --max-allocs-per-node 2500000
 
³ --opt-code-size --max-allocs-per-node 2500000
  

Revision as of 20:41, 21 September 2013

A history of code size in sdcc and a comparison to other compilers.

STM8 code size comparison (bytes):

File Cosmic C¹ IAR C² sdcc-stm8 #8537 sdcc #8820³
cvu_vinb.c 6 6 15 11
galois_lfsr.c 15 15 34 20
get_tile.c 89 87 129 90
huffman_iterative.c 134 171 323 156
huffman_recursive.c 140 168 358 195
init_loop.c 24 31 69 30
insertion_sort.c 92 111 247 137
memcpy_compression.c 43 54 93 66
memtovmemcpy.c 44 55 101 55
play_music.c 354 290 721 357
sdcc_mullong.c 127 179 673 348
set_screen_mode.c 49 49 75 66
set_sprite_x.c 55 65 152 66
z88dk-mktime.c 221 209 618 404
total 1393 1490 3609 1998


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 - 29 Nov 2011; Optimizer V4.3.6 - 29 Nov 2011. ² IAR C/C++ Compiler V1.40.1.50106 for STM8 21/Sep/2013 ³ --opt-code-size --max-allocs-per-node 2500000

This is a list of feature requests, that combined will probably get code size down near to the level of the non-free compilers.

Request ID Summary
Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox