comp.lang.ada
 help / color / mirror / Atom feed
From: Colin Paul Gloster <Colin_Paul_Gloster@ACM.org>
Subject: Re: small example, using complex variables in Ada
Date: Mon, 14 Jun 2010 20:19:24 +0100
Date: 2010-06-14T20:19:24+01:00	[thread overview]
Message-ID: <alpine.LRH.2.00.1006141925320.14982@64bit-RedHat-Enterprise-Linux6beta> (raw)
In-Reply-To: <huu12j$lck$1@munin.nbi.dk>

On June 11th, 2010, Randy Brukardt sent:

|-----------------------------------------------------------------------------|
|""Colin Paul Gloster" <Colin_Paul_Gloster@ACM.org> wrote in message          |
|news:alpine.LNX.2.00.1006111207170.3608@Bluewhite64.example.net...           |
|...                                                                          |
|> If any of you claims that you posted an unclear phrase which had not       |
|> been intended to be libelous which looks like you accused me of            |
|> inappropriately trying to apply premature optimization, then clarify       |
|> or be sued for libel.                                                      |
|                                                                             |
|Don't be so sensitive!"                                                      |
|-----------------------------------------------------------------------------|

Okay, I accept that Randy was not being abusive. Mr. Carter is still
to explain himself.

|-----------------------------------------------------------------------------|
|"Optimization is premature unless there is a demonstrated need for additional|
|performance."                                                                |
|-----------------------------------------------------------------------------|

I understand what you mean. I might even agree somewhat in general,
but not in this particular case. If the program needs to be sped up,
then fiddling with the loops (not just the ones accounting for 90% of
the running time, ideally it should be possible to change the looping
policy across the entire program by changing a single line of code or
a compiler switch) can have a fair impact (admittedly pretty small in
the grand scheme of things, but still worthwhile). Changing from
looping down to zero to looping up from zero is not going to speed
things up (not counting changes in speed caused by for example a
pseudonumber generator affected by the change in the executable: I
have seen this happen); and it is liable to slow things down. Looping
down to zero would be slightly faster, so why not just do it normally?
After making much more dramatic changes to the code in order to speed
it up, if it is still too slow, then turning around loop iterations'
directions wastes manhours to obtain speed which should have been
obtained by default.

Not that looping down to zero is necessarily the best
solution. Fortress by default uses concurrent array indexing. Not that
Fortress succeeds in its all of its goals re parallelism, but a so far
unpublished paper of mine skims on that which you could read after it
is published, if you are interested.

Mr. Carter's policy for looping is hacking, not engineering.

|-----------------------------------------------------------------------------|
|"In any case, being guilty of premature optimization has almost no reflection|
|on how good or bad of a programmer you are (something I am not in any        |
|position to judge)."                                                         |
|-----------------------------------------------------------------------------|

Well I recognize a good language, so I mustn't be completely bad.

|-----------------------------------------------------------------------------|
|"[..]                                                                        |
|                                                                             |
|And you have to know that I have been writing optimizing Ada compilers for   |
|the last 30 years (well, 29 years and 9 months to be exact), so I know how   |
|to performance optimize when necessary. But..."                              |
|-----------------------------------------------------------------------------|

Infinity per cent times how long I have veen writing Ada
compilers. Many of the pseudoC++ programs I use have recently been
ported to Microsoft Windows, but the currently most important one
(critical pieces of which I am porting to Ada) still has not been
compiled on Windows the last I heard. So maybe I will be ready to
order an RR optimizing compiler for Windows this year, or maybe you
will get round to releasing another GNU/Linux one.

|-----------------------------------------------------------------------------|
|"> Nasser M. Abbasi was not reverting to Ada as a complement to              |
|> Mathematica with the objective of producing slower software than           |
|> Mathematica.                                                               |
|                                                                             |
|My understanding was that the OP was comparing the readability and           |
|ease-of-creation of Fortran and Ada. I saw no indication that he was         |
|concerned about the performance."                                            |
|-----------------------------------------------------------------------------|

Well Nasser incorporated neither REVERSE nor WHILE in
news:hv57ap$m0l$1@speranza.aioe.org so my contributions to this thread
did not matter.

|-----------------------------------------------------------------------------|
|" And in many cases, the performance of the                                  |
|code isn't very relevant."                                                   |
|-----------------------------------------------------------------------------|

True.

|-----------------------------------------------------------------------------|
|" (Remember the 90/10 rule!) [..]                                            |
|[..]"                                                                        |
|-----------------------------------------------------------------------------|

It is not always that simple. Aside from that, the 90% might be spread
across the code instead of in a single subprogram, which is one factor
as to why traditional UNIX(R)  prof  is only helpful in particular
circumstances.

|-----------------------------------------------------------------------------|
|"P.S. I wouldn't waste time on suing someone. Only the lawyers make money in |
|most lawsuits. "                                                             |
|-----------------------------------------------------------------------------|

Oh I will be suing Pisa so-called "University" for ruining my life
when it misled me about what I would be doing there and forbade me
from speaking out against one of the biggest, buggiest, copy-and-paste
fests I ever saw. Unfortunately, scientific journals do not allow
already public knowledge so the aforementioned paper (which does not
focus on Fortress, but instead contains details re lies re supposedly
optimal SystemC(R) code) must be published before I sue Pisa so-called
"University".

As for making money, who will be the lawyer is a nice person and
helped me while I was short on cash (something which cannot be
truthfully said about participants of this newsgroup: a topic for a
section to name and shame in the paper (those of you who tried to help
me how you could: don't worry!, you are without blame)) so I have no
problem with letting the lawyer profit from putting those culprits in
gaol. At least there they will not find it so easy to promote shoddy
code in safety-critical devices and ruin other people's lives.

Sincerely,
Colin Paul Gloster



  reply	other threads:[~2010-06-14 19:19 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-09 10:49 small example, using complex variables in Ada Nasser M. Abbasi
2010-06-09 11:26 ` Ludovic Brenta
2010-06-09 23:50   ` Jerry
2010-06-10  1:03     ` Jeffrey R. Carter
2010-06-10 15:48   ` Colin Paul Gloster
2010-06-10 14:54     ` Ludovic Brenta
2010-06-10 16:21       ` Colin Paul Gloster
2010-06-10 17:37         ` Adam Beneschan
2010-06-10 17:57         ` Jeffrey R. Carter
2010-06-10 22:32           ` Randy Brukardt
2010-06-11 12:42             ` Colin Paul Gloster
2010-06-11 18:59               ` Randy Brukardt
2010-06-14 19:19                 ` Colin Paul Gloster [this message]
2010-06-14 19:48                   ` Nasser M. Abbasi
2010-06-17  7:44     ` Gautier write-only
2010-06-17 10:33       ` Colin Paul Gloster
2010-06-17 14:39       ` Yannick Duchêne (Hibou57)
2010-06-17 16:36         ` Colin Paul Gloster
2010-06-09 12:43 ` Niklas Holsti
2010-06-10  7:23 ` Stephen Leake
2010-06-10  9:12   ` J-P. Rosen
2010-06-10 11:03     ` Yannick Duchêne (Hibou57)
2010-06-10 13:27       ` J-P. Rosen
2010-06-10 21:15         ` Yannick Duchêne (Hibou57)
2010-06-11  7:22           ` Dmitry A. Kazakov
2010-06-11  8:48           ` J-P. Rosen
2010-06-11 12:00             ` Brian Drummond
2010-06-10  9:34   ` Nasser M. Abbasi
2010-06-10 20:12     ` Simon Wright
2010-06-14  9:33 ` Vincent LAFAGE
2010-06-14 12:29   ` Nasser M. Abbasi
2010-06-14 13:00     ` Vincent LAFAGE
replies disabled

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