Compiling as PIC

Andrew Haley aph at
Sun Dec 21 12:50:54 PST 2008

Clemens Eisserer wrote:

>> I just finished running the tests with SELinux disabled. The performance
>> difference between a PIC jvm and a non-PIC jvm was about 0.9%, with the PIC
>> jvm being actually faster. So any performance loss is negligible.
> Was this on x86 or x86_64? PIC still has non-negligible overhead on x86.

'twas x86.  As far as I know it's x86 that allows non-PIC shared

> As far as I know only the Garbage-Collectors are build as non-pic,
> everything else (where runtime performance doesn't matter that much)
> is built PIC.  Bug 6454213 talks about this.


> Which type of improvements have been made to GCC-4.3 that do change
> pic-code runtime performance that significantly?
> I thought the overhead introduced by PIC code for 32-bit x86 code is
> more or less caused by the lack of pc-relative adressing, which was
> fixed for 64-bit, so the results 6454213 talks about are quite what I
> would expect.

Sure, but we did very extensive performance measurements with SPEC jvm 2008,
which has a fairly wide range of real-life applications, and the difference
was so slight as to be down in the noise.


More information about the distro-pkg-dev mailing list