
On Sunday 08 March 2009 01:47:52 Vladimir Prus wrote:
Or are there any negative effects by enabling -fPIC?
-fPIC generates slower code. I am not aware of up-to-date data on how much slower.
On my numerically intensive software, -fPIC does not lead to any measurable slowdowns. Another data point comes from ATLAS (whose sole raison d'etre is speed in numerical computations) in its INSTALL.txt file: --- NOTE: Since gcc uses one less int register when compiling with this flag, this could potentially impact performance of the architectural defaults, but we have not seen it so far. --- However, note that both my library of code and ATLAS are primarily interested in floating point computation performance. Different conclusions may be reached for other types of computation load though I very much doubt it. Regards, Ravi