Difference between revisions of "Hc08 code size"

From SDCC wiki
Jump to: navigation, search
 
(HC08 code size comparison (bytes):)
Line 10: Line 10:
 
! sdcc #7660 hc08  
 
! sdcc #7660 hc08  
 
! sdcc #7670 hc08
 
! sdcc #7670 hc08
 +
! sdcc #8361 hc08
 
|-  
 
|-  
 
|  cvu_vinb.c  
 
|  cvu_vinb.c  
Line 16: Line 17:
 
|  7  
 
|  7  
 
|  7
 
|  7
 +
|  '''6'''
 
|-  
 
|-  
 
|  galois_lfsr.c  
 
|  galois_lfsr.c  
Line 22: Line 24:
 
|  31  
 
|  31  
 
|  23
 
|  23
 +
|  19
 
|-  
 
|-  
 
|  get_tile.c  
 
|  get_tile.c  
Line 28: Line 31:
 
|  138  
 
|  138  
 
|  130
 
|  130
 +
|  123
 
|-  
 
|-  
 
|  huffman_iterative.c  
 
|  huffman_iterative.c  
Line 34: Line 38:
 
|  490  
 
|  490  
 
|  325
 
|  325
 +
|  224
 
|-  
 
|-  
 
|  huffman_recursive.c  
 
|  huffman_recursive.c  
Line 40: Line 45:
 
|  713  
 
|  713  
 
|  433
 
|  433
 +
|  261
 
|-  
 
|-  
 
|  init_loop.c  
 
|  init_loop.c  
'''22'''
+
|  22  
'''22'''
+
|  22  
 
|  26  
 
|  26  
 
|  31
 
|  31
 +
|  '''19'''
 
|-  
 
|-  
 
|  insertion_sort.c  
 
|  insertion_sort.c  
Line 52: Line 59:
 
|  162  
 
|  162  
 
|  180
 
|  180
 +
|  152
 
|-  
 
|-  
 
|  memcpy_compression.c  
 
|  memcpy_compression.c  
Line 58: Line 66:
 
|  111  
 
|  111  
 
|  101
 
|  101
 +
|  97
 
|-  
 
|-  
 
|  memtovmemcpy.c  
 
|  memtovmemcpy.c  
Line 64: Line 73:
 
|  66  
 
|  66  
 
|  66
 
|  66
 +
|  72
 
|-  
 
|-  
 
|  play_music.c  
 
|  play_music.c  
Line 70: Line 80:
 
|  1257  
 
|  1257  
 
|  734
 
|  734
 +
|  650
 
|-  
 
|-  
 
|  sdcc_mullong.c  
 
|  sdcc_mullong.c  
Line 76: Line 87:
 
|  735  
 
|  735  
 
|  561
 
|  561
 +
|  416
 
|-  
 
|-  
 
|  set_screen_mode.c  
 
|  set_screen_mode.c  
Line 82: Line 94:
 
|  67  
 
|  67  
 
|  59
 
|  59
 +
|  50
 
|-  
 
|-  
 
|  set_sprite_x.c  
 
|  set_sprite_x.c  
Line 88: Line 101:
 
|  171  
 
|  171  
 
|  137
 
|  137
 +
|  '''89'''
 
|-  
 
|-  
 
|  z88dk-mktime.c  
 
|  z88dk-mktime.c  
Line 94: Line 108:
 
|  845  
 
|  845  
 
|  726
 
|  726
 +
|  601
 
|-  
 
|-  
 
|  total  
 
|  total  
Line 100: Line 115:
 
|  4819  
 
|  4819  
 
|  3513  
 
|  3513  
 +
|  2779
 
|}
 
|}
  

Revision as of 08:02, 8 January 2013

hc08 (and related ports) code size

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

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

S08 code size comparison (bytes):

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


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