From kde-devel Fri Jul 27 14:49:40 2001 From: Waldo Bastian Date: Fri, 27 Jul 2001 14:49:40 +0000 To: kde-devel Subject: Re: Faster startups by fixing C++ object files before linking ( 30-50% faster startups ) X-MARC-Message: https://marc.info/?l=kde-devel&m=99624565411511 On Thursday 26 July 2001 08:34 pm, Ian Reinhart Geiser wrote: > On Thursday 26 July 2001 06:01 pm, Leon Bottou wrote: > > Reading Waldo Bastian's text on C++ shared libraires gave me some ideas. > > Eventually I spent a few nights trying them. > > > > The proposed scheme modifies the object files before linking > > in a way that reduces the number of expensive relocations. > > Startup times are reduced by 30 to 50%. > > > > See the attached files for details. > > I may be confusing things but is this not about the same idea as > precompiled headers? No. > It sounds similar but I could be mistaken. Could > someone please explane this in a little more detail? Instead of 1: Call other_lib::some_func 2: Call other_lib::some_func 3: Call other_lib::some_func 4: Call other_lib::some_func ... It changes this in: 1: Call same_lib::some_func_stub 2: Call same_lib::some_func_stub 3: Call same_lib::some_func_stub 4: Call same_lib::some_func_stub ... some_func_stub: Call other_lib::some_func Since it is is expensive to link other_lib::some_func but rather cheap to link same_lib::some_func_stub this replaces 4 expensive link actions with 4 cheap ones and 1 expensive one. These link actions are done at startup. Cheers, Waldo -- Andrei Sakharov, Exiled 1980-1986, USSR, http://www.aip.org/history/sakharov/ Dmitry Sklyarov, Detained 2001-????, USA, http://www.elcomsoft.com/ >> Visit http://master.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<