Difference between revisions of "Hc08 code size"

From SDCC wiki
Jump to: navigation, search
(HC08 code size comparison (bytes):)
(S08 code size comparison (bytes):)
 
Line 123: Line 123:
 
! Code Warrior³ s08  
 
! Code Warrior³ s08  
 
!sdcc #7753 s08
 
!sdcc #7753 s08
 +
! sdcc #8361 s08
 
|-  
 
|-  
 
|  cvu_vinb.c  
 
|  cvu_vinb.c  
 
|  '''6'''  
 
|  '''6'''  
 +
|  '''6'''
 
|  '''6'''
 
|  '''6'''
 
|-  
 
|-  
Line 131: Line 133:
 
|  '''17'''  
 
|  '''17'''  
 
|  23
 
|  23
 +
|  19
 
|-  
 
|-  
 
|  get_tile.c  
 
|  get_tile.c  
 
|  '''96'''  
 
|  '''96'''  
 
|  121
 
|  121
 +
|  113
 
|-  
 
|-  
 
|  huffman_iterative.c  
 
|  huffman_iterative.c  
 
|  '''177'''  
 
|  '''177'''  
 
|  270
 
|  270
 +
|  181
 
|-  
 
|-  
 
|  huffman_recursive.c  
 
|  huffman_recursive.c  
 
|  '''180'''  
 
|  '''180'''  
 
|  305
 
|  305
 +
|  209
 
|-  
 
|-  
 
|  init_loop.c  
 
|  init_loop.c  
 
|  '''17'''  
 
|  '''17'''  
 
|  31
 
|  31
 +
|  19
 
|-  
 
|-  
 
|  insertion_sort.c  
 
|  insertion_sort.c  
 
|  '''88'''  
 
|  '''88'''  
 
|  164
 
|  164
 +
|  134
 
|-  
 
|-  
 
|  memcpy_compression.c  
 
|  memcpy_compression.c  
 
|  '''71'''  
 
|  '''71'''  
 
|  90
 
|  90
 +
|  76
 
|-  
 
|-  
 
|  memtovmemcpy.c  
 
|  memtovmemcpy.c  
 
|  57  
 
|  57  
 
|  '''52'''
 
|  '''52'''
 +
|  57
 
|-  
 
|-  
 
|  play_music.c  
 
|  play_music.c  
 
|  '''466'''  
 
|  '''466'''  
 
|  622
 
|  622
 +
|  570
 
|-  
 
|-  
 
|  sdcc_mullong.c  
 
|  sdcc_mullong.c  
 
|  '''148'''  
 
|  '''148'''  
 
|  471
 
|  471
 +
|  386
 
|-  
 
|-  
 
|  set_screen_mode.c  
 
|  set_screen_mode.c  
 
|  '''50'''  
 
|  '''50'''  
 
|  64
 
|  64
 +
|  '''50'''
 
|-  
 
|-  
 
|  set_sprite_x.c  
 
|  set_sprite_x.c  
 
|  '''59'''  
 
|  '''59'''  
 
|  100
 
|  100
 +
|  92
 
|-  
 
|-  
 
|  z88dk-mktime.c  
 
|  z88dk-mktime.c  
 
|  '''308'''  
 
|  '''308'''  
 
|  641
 
|  641
 +
|  542
 
|-  
 
|-  
 
|  total  
 
|  total  
 
|  '''1740'''  
 
|  '''1740'''  
 
|  2960
 
|  2960
 +
|  2454
 
|}
 
|}
  

Latest revision as of 08:10, 8 January 2013

[edit] hc08 (and related ports) code size

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

[edit] HC08 code size comparison (bytes):

File ByteCraft C6808¹ hc08 Cosmic C² hc08 sdcc #7660 hc08 sdcc #7670 hc08 sdcc #8361 hc08
cvu_vinb.c fails 6 7 7 6
galois_lfsr.c 16 11 31 23 19
get_tile.c fails 103 138 130 123
huffman_iterative.c fails 198 490 325 224
huffman_recursive.c fails 222 713 433 261
init_loop.c 22 22 26 31 19
insertion_sort.c 73 83 162 180 152
memcpy_compression.c fails 78 111 101 97
memtovmemcpy.c fails 57 66 66 72
play_music.c fails 546 1257 734 650
sdcc_mullong.c fails 146 735 561 416
set_screen_mode.c fails 40 67 59 50
set_sprite_x.c fails 89 171 137 89
z88dk-mktime.c fails 321 845 726 601
total fails 1922 4819 3513 2779

[edit] S08 code size comparison (bytes):

File Code Warrior³ s08 sdcc #7753 s08 sdcc #8361 s08
cvu_vinb.c 6 6 6
galois_lfsr.c 17 23 19
get_tile.c 96 121 113
huffman_iterative.c 177 270 181
huffman_recursive.c 180 305 209
init_loop.c 17 31 19
insertion_sort.c 88 164 134
memcpy_compression.c 71 90 76
memtovmemcpy.c 57 52 57
play_music.c 466 622 570
sdcc_mullong.c 148 471 386
set_screen_mode.c 50 64 50
set_sprite_x.c 59 100 92
z88dk-mktime.c 308 641 542
total 1740 2960 2454


graph-hc08.png

The benchmark files can be found at http://colecovision.eu/stuff/testbench.tar.gz

¹ C6808 "C" COMPILER 3.0.0.17 - Current evaluation version as of 2012-5-12

² C Compiler for M68HC08 (COSMIC Software); Generator V4.6.3 - 05 Aug 2008; Optimizer V4.5.9 - 05 Aug 2008 - Current evaluation version as of 2012-5-12

³ ANSI-C/cC++ Compiler for HC08 V-5.0.39 Build 11346, Dec 13 2011 - Current evaluation version as of 2012-5-12

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
3526527 Pointer analysis
3526526 Generalized constant propagation
3526292 Direct assignment / clear
3526285 Non-destructive and for ifx (hc08)
3526278 Multibyte constant assignment
3526274 Tail call optimization
3526270 Eliminate untargeted labels
3526269 Right operand for setting value at address
3526268 Right operand for GET_VALUE_AT_ADDRESS
3525464 lospre
3528282 notUsed()
Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox