public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: buhr@stat.wisc.edu (Kevin Buhr)
To: Jakob Østergaard <jakob@unthought.net>,
	Linus Torvalds <torvalds@transmeta.com>
Cc: Serge Orlov <sorlov@con.mcst.ru>,
	linux-kernel@vger.kernel.org,
	"David S. Miller" <davem@redhat.com>
Subject: Re: Linux 2.4.2 fails to merge mmap areas, 700% slowdown.
Date: 22 Mar 2001 22:32:51 -0600	[thread overview]
Message-ID: <vbawv9hyuj0.fsf@mozart.stat.wisc.edu> (raw)
In-Reply-To: <Pine.LNX.4.31.0103201042360.1990-100000@penguin.transmeta.com> <vba1yrr7w9v.fsf@mozart.stat.wisc.edu> <15032.1585.623431.370770@pizda.ninka.net> <vbay9ty50zi.fsf@mozart.stat.wisc.edu> <vbaelvp3bos.fsf@mozart.stat.wisc.edu> <20010322193549.D6690@unthought.net>
In-Reply-To: Jakob Østergaard's message of "Thu, 22 Mar 2001 19:35:49 +0100"

Jakob Østergaard <jakob@unthought.net> writes:
>
> Try compiling something like Qt/KDE/gtk-- which are really heavy on
> templates (with all the benefits and drawbacks of that).

Okay, I just compiled gtk-- 1.0.3 (with CFLAGS = "-O2 -g") under three
versions of GCC (Debian 2.95.3, RedHat 2.96, and a CVS pull of the
"gcc-3_0-branch") on the same Debian machine running kernel 2.4.2.

In all cases, the "cc1plus" processes appeared to max out around 25M
total size.  The "maps" pseudofiles for the 2.95.3 and and 3.0
compiles never grew past 250 lines, but the "maps" pseudofiles for the
RedHat 2.96 compile were gigantic, jumping to 3000 or 5000 lines at
times.

The results speak for themselves:

    CVS gcc 3.0:          Debian gcc 2.95.3:   RedHat gcc 2.96:
                      
    real    16m8.423s     real    8m2.417s     real    12m24.939s
    user    15m23.710s    user    7m22.200s    user    10m14.420s
    sys     0m48.730s     sys     0m41.040s    sys     2m13.910s 
maps:    <250 lines           <250 lines          >3000 lines

Obviously, the *real* problem is RedHat GCC 2.96.  If Linus bothers to
write this patch (he probably already has), its only proven benefit so
far is that it improves the performance of a RedHat-specific, orphaned
G++ development snapshot that everyone (the people of RedHat most of
all) will be glad to be rid of as soon as possible.

The numbers above suggest that the patch is unlikely to have a
positive impact on the performance of either officially released GCC
versions or the upcoming 3.0 release.

Drifting off topic...

> Mozilla uses C++ mainly as "extended C" - due to compatibility concerns.

This statement is potentially misleading.

I think most people will believe you to mean "using C++ as a better C"
in the sense of Stroustrup: using the small, conventional-language
subset of C++ that looks like C but has stronger type checking,
function and operator overloading, default arguments, "//" style
comments, reference types, and other syntactic and semantic sugar.

Mozilla does not use C++ as "extended C" in this sense.  While it does
use a *subset* of C++ for compatibility reasons, the subset includes
extensive use of class lattices and polymorphism as well as extensive
(albeit simple and carefully constructed) uses of templates for its
utility classes, including string and component-autoreferencing
template classes and functions that are used throughout the source.
The only major C++ facilities that are not used are the standard
library, RTTI, namespaces, and exception handling, but other than that
it's a good, real-world C++ test case.

Kevin <buhr@stat.wisc.edu>

  reply	other threads:[~2001-03-23  4:34 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-03-20 18:28 Linux 2.4.2 fails to merge mmap areas, 700% slowdown Serge Orlov
2001-03-20 18:43 ` Linus Torvalds
2001-03-20 18:59   ` Jakob Østergaard
2001-03-21  1:20   ` Kevin Buhr
2001-03-21  1:38     ` David S. Miller
2001-03-21 20:19       ` Kevin Buhr
2001-03-22 18:23         ` Kevin Buhr
2001-03-22 18:35           ` Jakob Østergaard
2001-03-23  4:32             ` Kevin Buhr [this message]
2001-03-24  4:11               ` Zack Weinberg
2001-03-24 21:46                 ` Kevin Buhr
2001-03-24  5:02               ` Linus Torvalds
2001-03-24  9:31                 ` Jakob Østergaard
2001-03-24  9:48               ` Jakob Østergaard
2001-03-24 19:54                 ` Kevin Buhr
2001-03-25  3:17                   ` Jakob Østergaard
2001-03-25 16:47                     ` Jamie Lokier
     [not found]               ` <200103240502.VAA02673@penguin.transmeta.com>
2001-03-24 21:22                 ` Kevin Buhr
2001-03-25  3:37                   ` Linus Torvalds
2001-03-26  4:22                     ` Kevin Buhr
2001-03-23 20:43             ` James Lewis Nance
2001-03-21  6:41     ` Mike Galbraith
2001-03-21 14:56       ` Matthias Urlichs
2001-03-21 15:05         ` Mike Galbraith
2001-03-21 15:59       ` Kurt Garloff
2001-03-21 16:45         ` Mike Galbraith
2001-03-21 20:16           ` Kevin Buhr
2001-03-22  9:04             ` Mike Galbraith
2001-03-22 22:19               ` Kevin Buhr
2001-03-23  7:44                 ` Mike Galbraith
2001-03-23 21:36                   ` 2.4.2-ac20 patch for process time double-counting (was: Linux 2.4.2 fails to merge mmap areas, 700% slowdown.) Kevin Buhr
2001-03-24  7:49                     ` Mike Galbraith
2001-03-24 19:27                       ` Kevin Buhr
2001-03-20 18:43 ` Linux 2.4.2 fails to merge mmap areas, 700% slowdown Jakob Østergaard
  -- strict thread matches above, loose matches on Subject: below --
2001-03-21  2:02 Dieter Nützel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=vbawv9hyuj0.fsf@mozart.stat.wisc.edu \
    --to=buhr@stat.wisc.edu \
    --cc=davem@redhat.com \
    --cc=jakob@unthought.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sorlov@con.mcst.ru \
    --cc=torvalds@transmeta.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox