[Devel] Towards OpenSER libification

Weiter Leiter bp4mls at googlemail.com
Mon Apr 23 14:22:23 CEST 2007


Julien,

On 4/23/07, Julien BLACHE <julien.blache at linbox.com> wrote:
>
> Weiter Leiter wrote:
>
> > The "hit" only affects the loader. After relocation is done (i.e.
> > program is running), there is no difference between a statically and a
> > dinamically linked executable, concerning performance.
>
> That's for the static vs. dynamic library, not for the non-PIC vs. PIC
> code...
>
Dynamic library does not mean PIC; with some effort, needs for PIC can
probably be removed from OpenSER's to-be libs.

OTOH, PIC is only about dynamic libraries, and the only issues concern
static and global variables, which are, indeed, addressed using one and
respectively two extra steps (ELF's GOT address loaded - as expensive as a
function call, but most probably done once at funtion entry - and relocated
pointer in GOT dereferenced for non statics - casual memory op cost).
This occurs in few cases (even with large libraries), generally, and
particularly for the proposed parser library (at a fast sweep, I only
identified one non static global and three statics that might even be
'stacked', in this effort).

So, OK, PIC can induces a penalty, per textbook manual, but hardly
"performance hits". I set aside the number of mainstream PIC libraries.

IMHO, shared  or static lib is no solid topic.

WL.

> JB.
>
> --
> Julien BLACHE                                 <julien.blache at linbox.com>
> Linbox / Free & ALter Soft                       <http://www.linbox.com>
>



-- 
"C is a language that combines all the elegance and power of assembly
language with all the readability and maintainability of assembly language."
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://openser.org/pipermail/devel/attachments/20070423/db35d7dd/attachment.htm


More information about the Devel mailing list