[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Monotone-devel] possibly of interest: new faster GNU linker

From: Zack Weinberg
Subject: [Monotone-devel] possibly of interest: new faster GNU linker
Date: Mon, 24 Mar 2008 11:05:37 -0400

I noticed that the GNU binutils folks have added a new experimental
linker to their source repository.  It's ELF only, it doesn't appear
to have been ported to anything but x86 (including amd64) yet, and I
don't know whether it'd work on anything but Linux (I don't see any
OS-specific code in there, which could be good or bad).  However, it's
allegedly five times faster than the old linker.  Linking the monotone
binary on my nice fast amd64 box, I get more like twice as fast, which
is still rather nice for a simple change to $PATH.

--- old
1.11user 0.25system 0:01.37elapsed
1.09user 0.27system 0:01.36elapsed
1.12user 0.25system 0:01.37elapsed

--- new
0.46user 0.13system 0:00.60elapsed
0.47user 0.13system 0:00.60elapsed
0.47user 0.12system 0:00.60elapsed

If you'd like to try it yourself, this is how:

cd <where you keep source code>
mkdir binutils
cd binutils
cvs -d :pserver:address@hidden:/cvs/src co binutils
mkdir build
cd build
../src/configure --prefix=$(cd .. && pwd)/install --enable-gold
make all-gold -j4
make install-gold
add .../binutils/install/bin to $PATH

There is also an even-more-experimental threaded mode (linking is
easily parallelized) but I couldn't persuade it to be faster than
without.  YMMV.  (If you want to try that, stick --enable-threads on
the configure command line above, and then you have to add
-Wl,--threads,--thread-count=<N> to your link line, where <N> is some
plausible number.)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]