From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fc89c,50784b2f7bdaf9a4 X-Google-Attributes: gidfc89c,public X-Google-Thread: 1014db,50784b2f7bdaf9a4 X-Google-Attributes: gid1014db,public X-Google-Thread: fee84,79b8fe58f42020cd X-Google-Attributes: gidfee84,public X-Google-Thread: 108717,50784b2f7bdaf9a4 X-Google-Attributes: gid108717,public X-Google-Thread: 1164f8,50784b2f7bdaf9a4 X-Google-Attributes: gid1164f8,public From: Damir Buskulic Subject: Re: Slowdown when dynamically loading a shared lib Date: 1999/03/19 Message-ID: <36F26A3E.F64EB78B@lapp.in2p3.fr>#1/1 X-Deja-AN: 456515983 Content-Transfer-Encoding: 7bit References: <36EF7CF6.B6A0325E@lapp.in2p3.fr> <519A71327421D2118C2000805F65E04D03423342@email.usinor.com> <36F01FAD.28AE@lapp.in2p3.fr> <7ctmnm$9ta@web3.tcd.ie> Content-Type: text/plain; charset=us-ascii Organization: LAPP Mime-Version: 1.0 Newsgroups: comp.lang.c,comp.programming,comp.sys.dec,comp.unix.programmer,comp.unix.osf.osf1 Stephen Kennedy wrote: > > >> >I've build such a library and when I load it dynamically, it is around > >> >10 times slower than if I link it to the executable at compile time. The > >> >exact same **small** routine. > > [my emphasis] > > There is a certain amount of time overhead involved in shared libraries, > If the routine is non trivial the space saved is well worth it. Very small > routines however... > > Could you wrap several calls to the lib into one bigger call? > And does it make a difference? > > Steve. Thanks for the suggestion. I found what it was. In fact, there seems to be a problem between egcs1.1.1 and the OSF1 loader. Everything works fine if I use cc instead of egcs. I suppose I should contact the egcs people Damir -- ===================================================================== | Damir Buskulic | Universite de Savoie/LAPP | | | Chemin de Bellevue, B.P. 110 | | Tel : +33 (0)450091600 | F-74941 Annecy-le-Vieux Cedex | | e-mail: buskulic@lapp.in2p3.fr | FRANCE | ===================================================================== mailto:buskulic@lapp.in2p3.fr