comp.lang.ada
 help / color / mirror / Atom feed
From: dewar@merv.cs.nyu.edu (Robert Dewar)
Subject: Re: GOTO considered necessary (reworked)
Date: 1997/06/21
Date: 1997-06-21T00:00:00+00:00	[thread overview]
Message-ID: <dewar.866897452@merv> (raw)
In-Reply-To: EC3u70.Ksu@world.std.com


Bob said, replying to me

<<>First, you certainly can't eliminate the actual initializatoin and
>finalization (unless you are *very* clever indeed :-)

Of course.  That's not "overhead".  That's what the program want's to
do, and of course that code needs to get executed, in general.

>>

The context here was my observation that people used finalization too
freely in some cases, without worrying about the efficiency effects. The
actual finalization time is definitely a (perhaps the) most important
component of the casual inefficiency that unthinking use of controlled
types introduces. I never focussed on the overhead issue in the term
you are using.

<<Granted.  However, a program without aborts (or, without any tasking at
all) doesn't need that overhead.  That's what pragma Restrictions is
for.  I didn't say it's "easy" to eliminate this overhead -- I said it's
possible.

>>


The use of pragma Restrictions for this kind of improvement is in practice
not very usable. That is because you have to recompile the world, including
all libraries, to take advantage of such a restriction. If you have many
such partition wide configuration switches, you quickly need hundreds
or even thousands of different versions of your libraries. Thus in practice
the use of pragma Restrictions is not practical for general purpose
programming.

<<But the overhead I was thinking of was the overhead of automatically
putting controlled objects onto lists and taking them off, which is also
possible, but not easy, to eliminate.

>>


Well let's wait to see whether anyone actually claims to have done this
(eliminate all lists for finalization). It is *much* harder than it appears
(it reminds me of the infamous Haberman-Nassi optimization of rebdezvous --
such an obvious idea, but the devil (the one in the details) won out in that
case -- the paper was in fact never published because of fundamental
technical difficulties in marginal cases). I suspect you will find the
same thing here. It is interesting that a number of C++ implementations
are moving towards using lists as they struggle with trying to get
destructors to work "right" with exceptions.






  reply	other threads:[~1997-06-21  0:00 UTC|newest]

Thread overview: 63+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-06-11  0:00 GOTO considered necessary (reworked) Samuel Mize
1997-06-11  0:00 ` Bryce Bardin
1997-06-12  0:00 ` Anonymous
1997-06-12  0:00   ` John G. Volan
1997-06-16  0:00     ` Anonymous
1997-06-12  0:00   ` Robert Dewar
1997-06-12  0:00     ` John G. Volan
1997-06-13  0:00       ` Robert A Duff
1997-06-16  0:00         ` John G. Volan
1997-06-17  0:00           ` Robert A Duff
1997-06-25  0:00             ` Van Snyder
1997-06-17  0:00           ` Robert I. Eachus
1997-06-17  0:00           ` Robert Dewar
1997-06-17  0:00             ` Robert A Duff
1997-06-18  0:00               ` Spam Hater
1997-06-20  0:00               ` Robert Dewar
1997-06-20  0:00               ` Robert Dewar
1997-06-21  0:00                 ` Robert A Duff
1997-06-21  0:00                   ` Robert Dewar
1997-06-25  0:00               ` Wolfgang Gellerich
1997-06-25  0:00                 ` Samuel T. Harris
1997-06-25  0:00                 ` Michael F Brenner
1997-06-26  0:00                   ` Wolfgang Gellerich
1997-06-19  0:00             ` Karel Th�nissen
1997-06-19  0:00               ` Karel Th�nissen
1997-06-23  0:00               ` John G. Volan
1997-06-23  0:00                 ` Spam Hater
1997-06-23  0:00                 ` Robert Dewar
1997-06-24  0:00                   ` Brian Rogoff
1997-06-25  0:00                   ` Featuritis not always bad (was re: GOTO considered necessary) Karel Th�nissen
1997-06-26  0:00                     ` Robert Dewar
1997-06-26  0:00                       ` Karel Th�nissen
1997-06-25  0:00                 ` GOTO considered necessary (reworked) Karel Th�nissen
1997-06-23  0:00             ` John G. Volan
1997-07-21  0:00           ` Shmuel (Seymour J.) Metz
1997-06-12  0:00 ` Michael F Brenner
1997-06-17  0:00   ` Robert Dewar
1997-06-17  0:00     ` Robert A Duff
1997-06-20  0:00       ` Robert Dewar
1997-06-21  0:00         ` Robert A Duff
1997-06-21  0:00           ` Robert Dewar [this message]
1997-06-13  0:00 ` Robert A Duff
1997-06-14  0:00   ` Samuel Mize
1997-06-14  0:00   ` Samuel Mize
1997-06-14  0:00     ` Matthew Heaney
1997-06-14  0:00   ` Robert Dewar
1997-06-16  0:00     ` Spam Hater
1997-06-17  0:00       ` Robert Dewar
1997-06-17  0:00         ` Spam Hater
1997-06-16  0:00     ` Robert A Duff
1997-06-17  0:00       ` Spam Hater
1997-06-17  0:00         ` Robert Dewar
1997-06-17  0:00           ` Robert A Duff
1997-06-19  0:00             ` John Herro
1997-06-25  0:00               ` Function result Van Snyder
1997-06-27  0:00                 ` Jon S Anthony
1997-06-27  0:00                 ` Robert Dewar
1997-06-20  0:00             ` GOTO considered necessary (reworked) Robert Dewar
1997-06-17  0:00           ` Spam Hater
1997-06-17  0:00         ` Robert A Duff
1997-06-19  0:00           ` Spam Hater
1997-06-16  0:00 ` Anonymous
1997-06-16  0:00   ` Robert Dewar
replies disabled

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