This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: 3.0 compiled application twice as slow as 2.95.3 compiled application (execution time)


On Tue, Jul 31, 2001 at 02:11:05AM -0400, Daniel Berlin wrote:
> Carlo Wood <carlo@alinoe.com> writes:
> 
> If people can get me preprocessed source to some of these things that
> are *much* (ie 2x the time) along with all the test data needed to
> reproduce, i'll happily look into it.

The example below can be best reproduced with the sources of
libcwd-0.99.10 itself I think.

Here are the instructions to reproduce it:

1) Get libcwd-0.99.10.tar.gz from http://sourceforge.net/project/showfiles.php?group_id=354&release_id=46069
2) tar xzf libcwd-0.99.10.tar.gz
3) cd libcw
4) ./bootstrap
5) cd src/libcwd
6) CC="gcc-2.95.3" CXX="g++-2.95.3" ./configure --enable-maintainer-mode
7) make
8) cd testsuite
9) make tst_bfd_shared
10) time tst_bfd_shared

In point 6), make sure it uses the correct libstdc++, I do this by using
a script for "g++-2.95.3" that adds an -rpath (see PS below).

For point 4) you will need to have installed libtool-1.4, automake-1.4pl1
or higher and GNU which 2.x.  Probably also autoconf-2.13 (2.52 doesn't
work I think).

Then reconfigure for g++-3.0, a 'make clean' in src/libcwd is recommended.

> > Using 3.0:
> > 
> > ~/c++/libcw/src/libcwd/testsuite>time tst_bfd_shared
...
> > real    0m1.691s
> > 
> > Using 2.95.3:
> > 
> > ~/c++/libcw/src/libcwd/testsuite>time tst_bfd_shared
...
> > real    0m0.795s

-- 
Carlo Wood <carlo@alinoe.com>

PS "gcc-2.95.3", "g++-2.95.3", "gcc-3.0" and "g++-3.0" are all hardlinks to
   a singe script that must be in your PATH (and which assumes that you
   installed the compilers in /usr/local/gcc-2.95.3 etc.):

-------------------------------------------------------------------------
COMPILER_VERSION=`echo $0 | sed -e 's%^.*-\(.*\)%\1%'`
COMPILER=`echo $0 | sed -e 's%^.*/\(...\)[^/]*%\1%'`
if [ $# = 1 -a $1 = '-v' ]; then
  /usr/local/gcc-$COMPILER_VERSION/bin/$COMPILER -v
  exit 0
fi
(
  (
    if /usr/local/gcc-$COMPILER_VERSION/bin/$COMPILER "-Wl,-rpath,/usr/local/gcc-$COMPILER_VERSION/lib:$LD_RUN_PATH" $*; then
      echo 'compilation successful' >&4
    fi 2>&1 1>&3 | grep -v ' linking not done' 1>&2
  ) 4>/dev/null 4>&1 | grep 'compilation successful' >/dev/null
) 3>/dev/null 3>&1
-------------------------------------------------------------------------


PS2 It should work if you use --enable-libcwd-static and tst_bfd_static.
    Perhaps you find that easier to debug(?).


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]