will using -fPIC affect performance ?

Tim Prince TimothyPrince@sbcglobal.net
Fri Dec 12 21:32:00 GMT 2008


john wrote:
>    Will using -fPIC affect the performance in anyway ? Does it disable any optimazations ? 
If you had read 'info gcc' you'd have seen this is target dependent.  
Typically, it may introduce additional overhead on function calls, 
compared with non-relocatable code.  On targets where this is an issue, 
certain libraries (e.g. libm) might be static linked to avoid the 
overhead, which used to approach 5% on ia64.



More information about the Gcc-help mailing list