From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jakub Jelinek To: "Boehm, Hans" Cc: "'Alexandre Oliva'" , tromey@redhat.com, Jeff Sturm , java@gcc.gnu.org, gcc@gcc.gnu.org Subject: Re: dynamic library cost (was RE: libtool, java woes) Date: Tue, 10 Apr 2001 15:00:00 -0000 Message-id: <20010410235253.D870@sunsite.ms.mff.cuni.cz> References: <140D21516EC2D3119EE7009027876644049B5D4C@hplex1.hpl.hp.com> X-SW-Source: 2001-04/msg00403.html On Tue, Apr 10, 2001 at 09:15:40AM -0700, Boehm, Hans wrote: > > From: Alexandre Oliva [ mailto:aoliva@redhat.com ] > > > > We either need libsupc++ to be a shared library, that both libstdc++ > > and libgcj depend on, or have libgcj depend on libstdc++. > > > One thing to keep in mind with all of this: > > I'm seeing significant overheads as a result of dynamic library calls. On a > PII/300 machine, a (single-threaded) loop containing only free(malloc(8)) > runs more than 20% faster when it's linked statically. This is similar on > an Itanium machine. I'm not sure how significant that is for typical C > programs, nor how frequently something like libsupc++ is called. I believe > it is currently very significant for libgcj and calls to the garbage > collector library from libgcj. Not to mention the dynamic linking overhead at startup (or dlopen) time which every additional shared library adds. Jakub