[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: packaging static lib oriented software

On 21-Jan-1998, bruce@va.debian.org <bruce@va.debian.org> wrote:
> I also have a lot of trouble believing a 30% slow-down for PIC code.
> Do you have good benchmarks for this?

I don't have figures, but I do have reasons...

This is likely only on x86 platforms.
PIC code uses an extra register. On the x86, registers are a scarce
commodity. 30% might be an extreme case, but it is possible. 5-10% is
probably more likely, and this is only with CPU intensive applications.

We did a lot of benchmarking of the Mercury language on various
platforms, and found that using non-PIC code (and hence static linking)
was noticably (certainly measurably) better. It depends on your
instruction use. The Mercury system makes extensive use of gcc global
registers, so was quite heavily affected. It gets worse if you
are using non-local gotos, because you have to make sure the register
used for PIC is reinitialized to the correct value after a goto.
(and yes, Mercury uses non-local gotos as well).

I don't have the figures on this handy, but it was a large enough
difference for us to special case the x86 to use non-PIC in
static libraries, which is simply not necessary on any other platform.

       Tyson Dowd           # 
                            #  Surreal humour isn't eveyone's cup of
     trd@cs.mu.oz.au        #  fur.
http://www.cs.mu.oz.au/~trd #

TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-devel-request@lists.debian.org . 
Trouble?  e-mail to templin@bucknell.edu .

Reply to: