[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-gcc-list] Whetstone Benchmark
From: |
Dmitry K. |
Subject: |
Re: [avr-gcc-list] Whetstone Benchmark |
Date: |
Thu, 24 Jan 2008 17:08:23 +1000 |
User-agent: |
KMail/1.5 |
On Thursday 24 January 2008 12:28, Andrew Hutchinson wrote:
[...]
> I was mistaken, I am using libc l.6.1
[...]
> Tried Winavr compiler with same setting and not sure what library
> version I have for 4.2
> There is no way to tell after its built but I guess it might be 1.2
> So instead look at xlib as size without library function
>
> text xlib cycles
> Os 4540 2276 89824
> O3 5690 3426 79875
My result is:
> >>> 4194 89204 4.2.2 -Os
> >>> 5388 72643 4.2.2 -O3
with command line:
avr-gcc -mmcu=atmega8 -Os whet.c dummy.c -lm
avr-gcc is 4.2.2 without any patches.
Such big difference (4540 vs. 4194) is strange.
Possible reasons (check, please):
1. Patch for avr-gcc, which forses save/restore all registers
in main, penalty is ~100 bytes.
2. '-fno-unit-at-a-time' option, penalty is ~50 bytes.
3. Another MCU, f.e. with ATmega128:
penalty for vectors: ~100 bytes
penalty for jmp/call: ~150 bytes
Regards,
Dmitry.