public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: Paul de Vrieze <pauldv@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Subject: Re: [gentoo-dev] Do we want optimal performance?
Date: Wed, 8 Sep 2004 15:16:59 +0200	[thread overview]
Message-ID: <200409081517.06195.pauldv@gentoo.org> (raw)
In-Reply-To: <20040908140358.10e0be61@VikingPC.home>

[-- Attachment #1: Type: text/plain, Size: 4778 bytes --]

On Wednesday 08 September 2004 14:03, Corvus Corax wrote:
> Am Wed, 8 Sep 2004 13:29:01 +0200
>
> schrieb Paul de Vrieze <pauldv@gentoo.org>:
> > ...
> >
> > To do this for programs, one would need to have a realistic suite of
> > "tests" that simulate the real world use of the application. Of
> > course that also allows -fprofile_arcs to be used.
> >
> > Paul
>
> depending on the type of program - for easy command line converter
> tools, an easy "time" command would be sufficient (used that to
> determine potential (in code) optimizations for my motiontrack stuff)

Timing is not the issue, the issue is what you have the program do. 
Initializing and then dying is not really a truthfull representation of 
normal behaviour.

> however for libraries like QT or gtk which affect on screen performace
> of gui programs - both run-time and load - this will get much harder.

Certainly, for gui's you need some kind of scripting that simulates actual 
user actions. (fortunately the interactive behaviour is not the 
bottleneck in most interactive applications as most user actions lead to 
almost trivial computations)

> Maybe one could program a test-suite for each library that fires each
> function once and times them, along with a flag saved before startup to
> determine load time - but it would have to be done for every huge
> library.

This is handwork, and also the different functions need different weights 
based on a.o. the frequency of their work. In other words it is a very 
big lot of work, and completely specific to the library/application at 
hand.

>
> And finally the timing of interactive programs itself - well, usually
> most time goes while waiting for user input anyway, but there are
> timing critical tasks, too, imagine pattern searches or other big db
> operatins - or file load/save in openoffice, picture effects in gimp
> and such.
> those could maybe timed by doing them on a real huge data blog, where
> the single operation takes that long, that the user can measure it
> manually with a stopwatch.

This is not interesting for gentoo to offer. If the user wants to do 
manual timing he allways can. What would be interesting is automated 
timing. This unfortunately is not really easy with current packages. This 
is most easy for applications with test suites. With relatively small 
effort these test suites could double up as "representative applications 
use" for timing and arc profiling (a newer option of gcc)

> If the operation takes 40 seconds, and you can gain 3 seconds by
> optimisations, it is a blunt measurable improvement. However I dont
> like that idea, maybe one can time the operation by watching tmp files
> in background or something like this.
>
> Or the maintainer could go into the code and insert some debug lines to
> print timing information to stderr or such. But this would be way to
> much work for most maintainers and most software isnt it ?

Well, I agree that there is much that can be done to improve application 
performance. However, even with cflags (which in many cases do not make 
the huge difference), it are all application specific optimizations. 
These are things that application providers should do, not 
packagers/distributors. We don't have the knowledge or the time to try to 
find out for each specific cpu/application combination what the "fastest" 
cflags are.

Also the review at the website still has it's issues. While it is quite 
known that -O3 is in many cases slower than -O2, it is also true that the 
internal architecture of CPU's matters. Fact is that gcc has had support 
and testing on amd64 machines for a lot longer time than on xeons with 
64bit extensions. Scheduling on the two different cpus is likely to have 
different optimal strategies. It is unlikely that the xeon 64-bit 
scheduler is as optimized as the amd64 scheduler. The x86_64 compiler 
also defaults to generating amd64 optimal code (amd64 used to be the only 
processor), so it is not strange that this codes performs much faster on 
an opteron than on a xeon.

This leads to the observation that one can still base a buying decision on 
the benchmarks one can not actually say that the opteron IS faster than 
the xeon. Only that the opteron can execute opteron optimized code faster 
than a xeon can. It is also known that the pentium4 architecture (which 
the xeon has) is highly dependend on good scheduling so the observation 
is not really a surprise.

Paul

ps. This does not mean that the opteron is not faster than the xeon, just 
that this test does not give a reasonable indication of it.

-- 
Paul de Vrieze
Gentoo Developer
Mail: pauldv@gentoo.org
Homepage: http://www.devrieze.net

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

  reply	other threads:[~2004-09-08 13:19 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-09-08 10:15 [gentoo-dev] Do we want optimal performance? Klavs Klavsen
2004-09-08 11:29 ` Paul de Vrieze
2004-09-08 12:03   ` Corvus Corax
2004-09-08 13:16     ` Paul de Vrieze [this message]
2004-09-08 12:19 ` Alin Nastac
2004-09-08 13:24   ` Marcus D. Hanwell
2004-09-08 13:43     ` Patrick Lauer
2004-09-08 14:21     ` Klavs Klavsen
2004-09-09  7:52       ` Paul de Vrieze
2004-09-08 12:49 ` Spider
2004-09-08 17:16   ` Robert Moss
2004-09-08 18:20 ` Chris Gianelloni
2004-09-08 19:11   ` Klavs Klavsen
2004-09-08 19:54     ` Paul de Vrieze
2004-09-08 20:05     ` Marcus D. Hanwell
2004-09-08 19:41 ` Lisa Seelye
2004-09-09  0:49 ` Daniel Goller
2004-09-09  1:51   ` [gentoo-dev] per package cflags (was Re: Do we want optimal performance?) Travis Tilley
2004-09-09  2:26     ` Robin H. Johnson
2004-09-09  3:42       ` Ned Ludd
2004-09-09  3:49         ` Robin H. Johnson
2004-09-09 17:23           ` Robert Moss
2004-09-09  4:41         ` Will Buckner
2004-09-09  4:51           ` Ciaran McCreesh
2004-09-09  6:07   ` [gentoo-dev] Do we want optimal performance? Klavs Klavsen

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=200409081517.06195.pauldv@gentoo.org \
    --to=pauldv@gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /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