Code generation is probably missing somewhat trivial optimizations. Here's one example:
int func(int x) {
return x * 1;
}
...still produces unnecessary stack manipulation: 0000 C1 [10] 56 pop bc
0001 E1 [10] 57 pop hl
0002 E5 [11] 58 push hl
0003 C5 [11] 59 push bc
0004 C9 [10] 60 ret
Plain "ret" would have been enough.