Language comparisons

Gerrit Muller gerrit.muller at philips.com
Wed May 9 07:05:10 EDT 2001


Alex Martelli wrote:
> 
<...snip..>
>  I think the first time I saw that explicitly
> observed was nearly 30 years ago, in a report or article by Per
> Brinch Hansen about a "Concurrent Pascal" compiler -- after many
> relatively-fruitless efforts at optimization, it turned out that
> one big time-sink for the whole compiler was a small routine whose
> job was removing trailing spaces from punched cards read in, if I
> recall correctly.  The way they found this out was by instrumenting
> the program to MEASURE where the time was being spent...

I have seen an very comparable situation some 20 years ago, where a
compiler spent most of its time in some string searching. The offending
routine, found with profiling could be replaced by a single VAX (very
complex) instruction, which improved the performance enormously.

<..snip..>
>  Instrumenting your
> program, or "profiling" it with external tools, is not as hard
> as all that, and there may be real performance to be gained that
> way, and perhaps even more relevant, from NOT expending huge
> amount of complications to optimize what doesn't need to be
> ("Premature optimization is the root of all evil", Knuth said...).
> 
Yes measuring as part of performance optimization is essential. Most
programmers have no or the wrong intuition w.r.t. performance.

However performance can only be obtained if it is "architected" from the
start. Most performance issues have nothing to do with the programming
language, processor and all of these very performance determining
components. Instead often higher level design constructs make or break
the performance. For instance fine grained locking or fine grained
transactions may totally kill the performance, due to overheads, while
in other cases it saves performance because it avoids killing
bottlenecks. So Perofrmance optimization might be the root of a lot of
evil, compementary lack of performance design is the root of many
ill-performing applications.

> Alex

regards Gerrit 
-------------------------------------------------------------------------
Gerrit Muller                Philips Research Laboratories Eindhoven
Building:   WLp 1 17                    Prof. Holstlaan 4
Phone: +31 40 27 45242               5656 AA  Eindhoven
Fax:   +31 40 2743741          The Netherlands
mailto:gerrit.muller at philips.com
http://www.extra.research.philips.com/natlab/sysarch/index.html



More information about the Python-list mailing list