[Gllug] Office software

Nix nix at esperi.demon.co.uk
Sat Nov 17 22:05:47 UTC 2001


On Fri, 16 Nov 2001, Simon Stewart stated:
> I thought that g++ generated non-optimal code (Nix will prolly know
> more)

Depends what you mean. G++-2.95 was missing a (fairly large) bunch of
optimizations that the C side had, but this is no longer the case as of
GCC-3.0, as they share more code now.

C++ compilers may well generate less-optimized code for a given lump of
C-compatible code than a C compiler would, because they have to consider
the way exceptions may affect control flow &c.

The biggest problems with G++ right now are the horrible parser (which
Mark Mitchell is fixing, but it might not be ready in time for GCC-3.1),
the compilation speed and memory consumption (which everyone is trying
to fix), and the lack of support for `export'.

Optimization across GCC will get a big boost when we add more levels of
intermediate representation for the source than the portable-assembler
RTL, but as of yet no higher-level IR has been written, so we're
basically kludging optimizations into RTL when they should really sit at
higher levels (SSA in particular suffers from this).

>       Last time I had a root through the KDE sources, the key
> libraries seemed to make sense in the way that they were designed. I
> also hear rumblings about the speed of the signals/slots Troll Tech
> extensions to C++, especially where extensive use is made of them. But
> IANAC++ guru.

Startup time of big C++ programs is damaged by two things

- GCC generates more relocations than is strictly necessary. The
  binutils have just acquired the ability to merge and sort them, see the
  -z combreloc option; you need a new glibc (maybe only 2.2.4) to get much
  startup-time advantage from this though.

- ELF's LD_PRELOAD combines with C++ virtual function indirection in an
  ugly way, requiring multiple relocations per virtual function. In a
  big C++ program this can require tens or hundreds of thousands of
  relocations at every startup. `ELF prelinking' can fix this (at the
  cost of breaking LD_PRELOAD for prelinked applications); again, you
  need a very new binutils for this (and perhaps a new GCC too).
  You also need a new kernel (2.2.20 or late 2.4.x).

(IIRC.)

> OTOH, I just added the FISH KIO-slave, and suddenly the entire
> environment can make use of SSH. Which is v. cool. :)

Does SSH here mean the secure shell? If so, I can't parse this sentence
at all :)

-- 
`You're the only person I know who can't tell the difference
 between a pair of trousers and a desk.' --- Kieran, to me

-- 
Gllug mailing list  -  Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug




More information about the GLLUG mailing list