This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: has the linker an impact on performance of generated code?
- To: losi at altrimedia dot it (Paolo Losi)
- Subject: Re: has the linker an impact on performance of generated code?
- From: Joern Rennecke <amylaar at cygnus dot co dot uk>
- Date: Tue, 29 Sep 1998 18:06:51 +0100 (BST)
- Cc: egcs at cygnus dot com
> Hello,
> the question is simple: is that possible that in between all the
> possible combinations of compilers (egcs 1.1b gcc 2.7.2.3) switches (-O1
> -O2 -O3) and linkers the best solution as far as performance of
> generated code is concerned is the following:
>
> egcs -c -O1 -fomit-frame-pointer prime.c
You could also try -Os -fomit-frame-pointer .
> gcc-2.7 -s -lm prime.o
This will link the the libraries for gcc-2.7 . In particular, the long long
remainder / divide is a library function.
If you hand-code these functions carefully in assembler and link in these
versions, this will probably get you better performance.