comp.lang.ada
 help / color / mirror / Atom feed
From: Jeffrey Creem <jeff@thecreems.com>
Subject: Re: sub-optimal code for packed boolean arrays -- bug or inherent limitation
Date: Wed, 04 Jul 2007 06:15:19 -0400
Date: 2007-07-04T06:15:19-04:00	[thread overview]
Message-ID: <0j8sl4-pp5.ln1@newserver.thecreems.com> (raw)
In-Reply-To: <huCii.12793$Fc.1922@attbi_s21>

Jeffrey R. Carter wrote:

> My reaction is due to an allergy to premature optimization, the root of 
> all evil.
> 

"Premature Optimization" is one of those pieces of conventional wisdom 
that gets repeated often but which is in fact not the problem at 
all..Not really.

In any real-world problem, you rarely get to spend 6 months making it 
faster because you did such a poor job up front in designing the problem.

Often, by the time one has created a design mess that is slow 
everywhere, spending the short time optimizing the scary loops is not 
enough because the design itself is broken.

The real problem is not so much premature optimization but crazy 
micro-optimizations done early that also hurt maintainabilty/clarity of 
the code and often do little if anything to actually make the code faster.

Spending time up front thinking about the overall design and even 
worrying a little about specific performance details when not taken to 
the extreme and when done with the benefit of metrics backed experience 
(v.s. I heard one time that compiler X was slow on this) is actually not 
all that bad.

This is of course especially true when one considers that by the end of 
the project when you go to start profiling the code to find the hotspots 
and find out that your lousy tool set does not support profiling with 
programs with tasks, or does not support profiling of non-trivial 
programs at all.



  reply	other threads:[~2007-07-04 10:15 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-02 19:34 sub-optimal code for packed boolean arrays -- bug or inherent limitation Alinabi
2007-07-02 20:08 ` Ludovic Brenta
2007-07-03  1:01 ` Jeffrey R. Carter
2007-07-03  7:22   ` Harald Korneliussen
2007-07-03  8:37     ` Georg Bauhaus
2007-07-03  7:59 ` gautier_niouzes
2007-07-03  9:25 ` Stefan Lucks
2007-07-03 12:40   ` Stefan Lucks
2007-07-03 15:42 ` Adam Beneschan
2007-07-03 18:04 ` Alinabi
2007-07-03 18:09   ` Alinabi
2007-07-03 18:17     ` Alinabi
2007-07-10  2:06       ` Randy Brukardt
2007-07-03 18:36   ` Jeffrey R. Carter
2007-07-03 19:42     ` Alinabi
2007-07-04  1:12       ` Jeffrey R. Carter
2007-07-04 10:15         ` Jeffrey Creem [this message]
2007-07-04 18:28           ` Jeffrey R. Carter
2007-07-04  3:22       ` Steve
2007-07-04  6:31         ` Harald Korneliussen
2007-07-08 22:53     ` Robert A Duff
2007-07-09  6:09       ` tmoran
2007-07-04  9:00   ` Jean-Pierre Rosen
2007-07-04 18:27     ` tmoran
2007-07-04 19:16       ` Pascal Obry
2007-07-05  1:45         ` tmoran
2007-07-05  4:53       ` Jeffrey R. Carter
2007-07-04 18:51     ` tmoran
2007-07-08 22:58 ` Robert A Duff
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox