Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 28 Aug 1997 20:35:25 -0400
From:      "Louis A. Mamakos" <louie@TransSys.COM>
To:        Warner Losh <imp@rover.village.org>
Cc:        Dave Hayes <dave@jetcafe.org>, Sean Eric Fagan <sef@kithrup.com>, hackers@FreeBSD.ORG
Subject:   Re: shared libraries? 
Message-ID:  <199708290035.UAA17627@whizzo.TransSys.COM>
In-Reply-To: Your message of "Thu, 28 Aug 1997 16:32:14 MDT." <E0x4D6t-000624-00@rover.village.org> 
References:  <199708281846.LAA10799@hokkshideh.jetcafe.org>  <E0x4D6t-000624-00@rover.village.org>

next in thread | previous in thread | raw e-mail | index | archive | help
> In message <199708281846.LAA10799@hokkshideh.jetcafe.org> Dave Hayes writes:
> : Correct me if I am wrong (and you most undoubtedly will), but isn't
> : this counter-intuitive to almost every other architechure out there?
> 
> Generally, on most architectures PIC code is slower than non-PIC code.
> At least on sparc, 68k, mips and alpha (as well as x86).  The
> generally quoted number is 10%.  That's what various docs that I've
> seen over the years have quoted.  That's one reason why many
> benchmarks are done with static binaries...

But on other architectures (like the 68K), you've got a pile of index
registers you can use to point at stuff, and the compiler isn't
repeatedly computing an address, and loading it into the (one or two)
registers you can index off of.

Not that I'm a real whiz on the i386 assembly code, but you've already
chewed up on index register pointing at the base of the stack frame;
all the other references compete for BX and you're using AX to compute
the addresses.  The 68K has got a nice architecture with 8 general
purpose accumulators, and another 8 address/index registers..

louie






Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199708290035.UAA17627>