Difference between revisions of "Stm8 code size"

From SDCC wiki
Jump to: navigation, search
m
m
(One intermediate revision by one user not shown)
Line 7: Line 7:
 
! IAR C²
 
! IAR C²
 
! sdcc-stm8 #8537
 
! sdcc-stm8 #8537
! sdcc #8820³
+
! sdcc #8884³
 
|-  
 
|-  
 
|  cvu_vinb.c  
 
|  cvu_vinb.c  
Line 13: Line 13:
 
|  '''6'''
 
|  '''6'''
 
|  15
 
|  15
11
+
10
 
|-  
 
|-  
 
|  galois_lfsr.c  
 
|  galois_lfsr.c  
Line 19: Line 19:
 
|  '''15'''
 
|  '''15'''
 
|  34
 
|  34
20
+
'''15'''
 
|-  
 
|-  
 
|  get_tile.c  
 
|  get_tile.c  
 
|  89
 
|  89
'''87'''
+
|  87
 
|  129
 
|  129
90
+
'''84'''
 
|-  
 
|-  
 
|  huffman_iterative.c  
 
|  huffman_iterative.c  
Line 31: Line 31:
 
|  171
 
|  171
 
|  323
 
|  323
156
+
162
 
|-  
 
|-  
 
|  huffman_recursive.c  
 
|  huffman_recursive.c  
Line 37: Line 37:
 
|  168
 
|  168
 
|  358
 
|  358
195
+
174
 
|-  
 
|-  
 
|  init_loop.c  
 
|  init_loop.c  
Line 43: Line 43:
 
|  31
 
|  31
 
|  69
 
|  69
30
+
28
 
|-  
 
|-  
 
|  insertion_sort.c  
 
|  insertion_sort.c  
Line 55: Line 55:
 
|  54
 
|  54
 
|  93
 
|  93
66
+
56
 
|-  
 
|-  
 
|  memtovmemcpy.c  
 
|  memtovmemcpy.c  
Line 61: Line 61:
 
|  55
 
|  55
 
|  101
 
|  101
55
+
51
 
|-  
 
|-  
 
|  play_music.c  
 
|  play_music.c  
Line 67: Line 67:
 
|  '''290'''
 
|  '''290'''
 
|  721
 
|  721
357
+
353
 
|-  
 
|-  
 
|  sdcc_mullong.c  
 
|  sdcc_mullong.c  
Line 79: Line 79:
 
|  '''49'''
 
|  '''49'''
 
|  75
 
|  75
66
+
61
 
|-  
 
|-  
 
|  set_sprite_x.c  
 
|  set_sprite_x.c  
Line 85: Line 85:
 
|  65
 
|  65
 
|  152
 
|  152
66
+
62
 
|-  
 
|-  
 
|  z88dk-mktime.c  
 
|  z88dk-mktime.c  
Line 91: Line 91:
 
|  '''209'''
 
|  '''209'''
 
|  618
 
|  618
404
+
347
 
|-  
 
|-  
 
|  total  
 
|  total  
Line 97: Line 97:
 
|  1490
 
|  1490
 
|  3609
 
|  3609
1998
+
1888
 
|}
 
|}
  
Line 105: Line 105:
 
All compilers have been configured for strong optimization for code size.
 
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. Current version as of mid-2013.
+
¹ C Compiler for STM8 (COSMIC Software); Generator V4.3.7; Optimizer V4.3.6. Current version as of mid-2013.
  
 
² IAR C/C++ Compiler V1.40.1.50106 for STM8. Current version as of mid-2013.
 
² IAR C/C++ Compiler V1.40.1.50106 for STM8. Current version as of mid-2013.
  
³ --opt-code-size --max-allocs-per-node 2500000
+
³ --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.
 
This is a list of feature requests, that combined will probably get code size down near to the level of the non-free compilers.

Revision as of 14:17, 26 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 #8884³
cvu_vinb.c 6 6 15 10
galois_lfsr.c 15 15 34 15
get_tile.c 89 87 129 84
huffman_iterative.c 134 171 323 162
huffman_recursive.c 140 168 358 174
init_loop.c 24 31 69 28
insertion_sort.c 92 111 247 137
memcpy_compression.c 43 54 93 56
memtovmemcpy.c 44 55 101 51
play_music.c 354 290 721 353
sdcc_mullong.c 127 179 673 348
set_screen_mode.c 49 49 75 61
set_sprite_x.c 55 65 152 62
z88dk-mktime.c 221 209 618 347
total 1393 1490 3609 1888


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 V1.40.1.50106 for STM8. Current version as of mid-2013.

³ --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.

Request ID Summary
Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox