Subject: Re: Switching lib/csu/c++/c++rt0.c to -fPIC
To: Simon Burge <email@example.com>
From: Paul Kranenburg <firstname.lastname@example.org>
Date: 12/14/1999 15:13:58
> Is performance such an issue if it's just c++rt0.o that's compiled with
> -fPIC? There's not that much that's done in there, and it only happens
> at program start-up and shut-down. If I'm not missing something I'd say
> b) is a sure winner here...
This does not affect start-up time. But it does cost at run-time:
one extra instruction for each reference to some global data item.
A simple benchmark test shows that the overhead is measurable:
about 5% for a load-global-data bound pic module. (measured on
a 50Mhz Sparcstation 5).