Boost logo

Boost Users :

Subject: Re: [Boost-users] Static linking/GCC 4.3.2 on Linux (-fPIC missing?)
From: Ravi (lists_ravi_at_[hidden])
Date: 2009-03-09 10:52:08


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

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net