This is the mail archive of the guile@cygnus.com mailing list for the Guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: -fpic (Well, that's interesting.)


Telford Tendys <telford@eng.uts.edu.au> writes:

> At the moment, yes it does but that's a trade-off that some people might
> consider reasonable if it buys them as much speed as was previously noted.
> I'm doing some speed measurements and I don't notice a lot of difference
> with and without the -fpic. I do notice that the code is usually smaller
> with the -fpic. I haven't looked into the difference really really closely
> though.

The speed gained really depends on the code. Arithmatic intensive code
is very likely to get a big gain (hey, extra register, woohoo!). It's
probably best to do this for very speed critical bits (and it's just
as easy then to build it as a static library... the gc stuff in guile 
immediately comes to mind as something that'd probably benefit from
being statically linked in, and it won't cause the executable to bloat
tremendously). 

> At some future stage, the ld.so program might be smart enough to recognise
> cases where the non-pic library gets loaded into the same memory zone each
> time it gets used so it can overlap those code pages, maybe this is wishful
> thinking. I take back the bit about better to always switch it off because
> there could be cases either way where it is better on or off.

Depends on the size of the library, and how many different programs
are using it. You wouldn't really want to do this with libc :), since
it could very easily end up thrashing, which'll make the pic code
performance look great.


-- 
Greg

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]