comp.lang.ada
 help / color / mirror / Atom feed
From: kilgallen@eisner.decus.org (Larry Kilgallen)
Subject: Re: CRC in Ada?
Date: 1997/03/07
Date: 1997-03-07T00:00:00+00:00	[thread overview]
Message-ID: <1997Mar7.090814.1@eisner> (raw)
In-Reply-To: E6n850.3Ct@world.std.com


In article <E6n850.3Ct@world.std.com>, bobduff@world.std.com (Robert A Duff) writes:
> In article <1997Mar6.114441.1@eisner>,
> Larry Kilgallen <kilgallen@eisner.decus.org> wrote:
>>If a programmer _assumes_ that such a construct will be efficient,
>>when in fact it is _not_ efficient within a particular environment,
>>it is a mistake from a performance perspective.
> 
> OK, but where do you draw the line?  Suppose I'm trying to write
> portable software.  I measure the performance on my current
> OS/compiler/libraries, and it's fine.  Can I assume that it will still
> perform as expected on any other platform?

Starting with something which performs well in at least one environment
is certainly a bare minimum.  I happen to think there is a need to plan
for revisiting performance when switching environments.

> Why should I not assume that a get-character-from-file operation takes
> more than a few instructions, on average?  I know how to implement such
> an operation, and it's not hard.  If it turns out that some OS does it
> slowly, then I feel righteous in blaming the OS.  (Of course, from a
> practical point of view, if that OS is popular, then I'll have to live
> with its limitations.)

Why should finding a record with particular contents in the middle of
a file take a long time?  There are books about how to write indexed
file systems, but some operating systems skipped that part of what I
am accustomed to relying upon.  I don't include that to start a
feature war, but to introduce the next question:  How hard is it to
get-character-from-file when the file has all that baggage used to
find records with with particular contents ? DEC compilers run
more slowly when fed such a file, because it is beyond the ability
programmed into their map-it-into-memory trick.

What you (or I) see as limitations in a particular selection of
compiler/os/library may be exactly what someone else needs to do
their job.

> Remember this [sub]thread started with the claim that VMS folks had to
> go to a lot of trouble to support those "evil" C programmers who wanted
> to do char-by-char input.  My response is: Good, somebody forced them to
> do what they should do -- namely, implement char-by-char input
> efficiently.

While I understand that is your view on what they should do, not all
will share it. The last time I needed to do character-at-a-time IO was
to emulate an editor which required a termination character on input
_unless_ the first character was one particular alphabetic character
(which had no special meaning in other than the first position).  I
have been faced with a different set of projects than you, but I have
my own list of things that "any environment ought to do properly" such
as file versioning :-).

>>I have run into programmers making this mistake over and over again.
>>In recent years their immediate response has been "Gee, it runs fast
>>on Unix", but in prior years their response was "Gee, it runs fast
>>on MVS".  Obviously it is only the recent history where the C language
>>is involved, but the current generation seems much more surprised than
>>their MVS-centric predecessors.
> 
> Seems pretty reasonable to me: if Unix or MVS can do it fast, why can't
> whatever-OS-we're talking about do it fast?  If not, it seems like the
> fault of the OS, or the standard libraries implementation.

Sorry if I was unclear, but Unix and MVS could not do the _same_thing_
fast.  The only commonality was that people coming from Unix and
people coming from MVS both assumed that the new operating system
would have the same performance characteristics as the one they are
coming from.  Now obviously it is impossible for the target operating
system to fully mimic the behaviour of both Unix and MVS at the same
time to make both camps happy.

Larry Kilgallen




  reply	other threads:[~1997-03-07  0:00 UTC|newest]

Thread overview: 143+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-03-02  0:00 CRC in Ada? Dr. John B. Matthews
1997-03-03  0:00 ` David Brown
1997-03-03  0:00 ` Tom Moran
1997-03-04  0:00 ` David L Brown
1997-03-04  0:00   ` Robert Dewar
1997-03-05  0:00   ` Stephen Garriga
1997-03-05  0:00     ` Larry Kilgallen
1997-03-05  0:00       ` Robert A Duff
1997-03-05  0:00         ` Larry Kilgallen
1997-03-06  0:00           ` Robert A Duff
1997-03-06  0:00             ` Robert Dewar
1997-03-06  0:00             ` Robert Dewar
1997-03-09  0:00               ` Dr. John B. Matthews
1997-03-06  0:00             ` Robert Dewar
1997-03-06  0:00             ` Larry Kilgallen
1997-03-06  0:00           ` Fergus Henderson
1997-03-06  0:00             ` Robert Dewar
1997-03-06  0:00             ` Larry Kilgallen
1997-03-06  0:00               ` Robert A Duff
1997-03-07  0:00                 ` Larry Kilgallen [this message]
1997-03-07  0:00                   ` Robert A Duff
1997-03-07  0:00                   ` Tom Moran
     [not found]                     ` <1997Mar7.202252.1@eisner>
1997-03-08  0:00                       ` Robert Dewar
1997-03-09  0:00                         ` Geert Bosch
1997-03-11  0:00                           ` Robert Dewar
1997-03-12  0:00                             ` Mats Weber
1997-03-12  0:00                               ` Robert Dewar
1997-03-10  0:00                     ` Robert Dewar
1997-03-10  0:00                       ` Tom Moran
1997-03-12  0:00                         ` Robert Dewar
1997-03-10  0:00                     ` Dr. John B. Matthews
1997-03-10  0:00                   ` Jim Balter
1997-03-07  0:00                 ` Robert Dewar
1997-03-10  0:00               ` Jim Balter
1997-03-10  0:00           ` David Brown
1997-03-12  0:00             ` Robert Dewar
1997-03-10  0:00           ` Tarjei Jensen
1997-03-10  0:00             ` Robert Dewar
1997-03-10  0:00             ` Robert Dewar
1997-03-10  0:00               ` Graham Hughes
1997-03-11  0:00                 ` Robert Dewar
1997-03-11  0:00                   ` Graham Hughes
1997-03-12  0:00                     ` Robert Dewar
1997-03-11  0:00           ` Mark & Zurima McKinney
1997-03-12  0:00           ` Robert I. Eachus
1997-03-12  0:00           ` Ole-Hjalmar Kristensen FOU.TD/DELAB
1997-03-13  0:00           ` Jon S Anthony
1997-03-13  0:00             ` Robert Dewar
1997-03-14  0:00               ` Jim Balter
1997-03-14  0:00           ` Jon S Anthony
1997-03-15  0:00             ` Dr. John B. Matthews
1997-03-15  0:00             ` Robert Dewar
1997-03-17  0:00           ` Jon S Anthony
1997-03-06  0:00       ` Ole-Hjalmar Kristensen FOU.TD/DELAB
1997-03-07  0:00       ` Ole-Hjalmar Kristensen FOU.TD/DELAB
1997-03-07  0:00         ` Robert Dewar
1997-03-08  0:00           ` Robert A Duff
1997-03-10  0:00           ` Jim Balter
1997-03-11  0:00             ` Robert Dewar
1997-03-11  0:00               ` Jim Balter
1997-03-11  0:00                 ` Robert Dewar
1997-03-12  0:00                   ` Jim Balter
1997-03-14  0:00                     ` Richard A. O'Keefe
1997-03-14  0:00                       ` Jim Balter
1997-03-06  0:00   ` Ole-Hjalmar Kristensen FOU.TD/DELAB
1997-03-06  0:00     ` Graham Hughes
1997-03-06  0:00       ` Robert Dewar
1997-03-06  0:00     ` Larry Kilgallen
1997-03-09  0:00       ` Robert Dewar
1997-03-07  0:00   ` David Brown
1997-03-07  0:00   ` Ole-Hjalmar Kristensen FOU.TD/DELAB
1997-03-07  0:00   ` Ole-Hjalmar Kristensen FOU.TD/DELAB
1997-03-07  0:00     ` Robert Dewar
1997-03-08  0:00       ` Fergus Henderson
1997-03-10  0:00       ` Jim Balter
1997-03-11  0:00         ` Robert Dewar
1997-03-11  0:00           ` Jim Balter
1997-03-12  0:00             ` Robert Dewar
1997-03-12  0:00               ` Jim Balter
1997-03-14  0:00                 ` Samuel Mize
1997-03-11  0:00           ` Jim Balter
1997-03-11  0:00             ` Robert Dewar
1997-03-12  0:00               ` Jim Balter
1997-03-10  0:00   ` Ole-Hjalmar Kristensen FOU.TD/DELAB
1997-03-10  0:00   ` Ole-Hjalmar Kristensen FOU.TD/DELAB
1997-03-10  0:00     ` Robert Dewar
1997-03-10  0:00       ` Jim Balter
1997-03-11  0:00         ` Robert Dewar
1997-03-11  0:00           ` Jim Balter
1997-03-11  0:00             ` Robert Dewar
1997-03-12  0:00               ` Jim Balter
1997-03-11  0:00       ` Fergus Henderson
1997-03-11  0:00   ` Ole-Hjalmar Kristensen FOU.TD/DELAB
1997-03-12  0:00   ` Ole-Hjalmar Kristensen FOU.TD/DELAB
1997-03-12  0:00   ` Ole-Hjalmar Kristensen FOU.TD/DELAB
1997-03-12  0:00   ` Jim Balter
1997-03-04  0:00 ` Jon S Anthony
1997-03-05  0:00   ` Robert Dewar
1997-03-04  0:00 ` Stephen Garriga
1997-03-04  0:00   ` Matthew Heaney
1997-03-04  0:00   ` Tom Moran
1997-03-04  0:00     ` Stephen Garriga
1997-03-04  0:00   ` Robert Dewar
1997-03-05  0:00     ` Stephen Garriga
1997-03-15  0:00     ` Michael & Amy Hartsough
1997-03-16  0:00       ` Robert Dewar
1997-03-16  0:00         ` Michael & Amy Hartsough
1997-03-16  0:00           ` Robert Dewar
1997-03-18  0:00             ` Michael & Amy Hartsough
1997-03-19  0:00               ` Robert Dewar
1997-03-20  0:00                 ` Michael & Amy Hartsough
1997-03-22  0:00                   ` Robert Dewar
1997-03-24  0:00                     ` Sequential IO on OpenVMS (was: CRC in Ada?) Ken Garlington
1997-03-24  0:00                       ` Larry Kilgallen
1997-03-22  0:00                   ` CRC in Ada? Mark & Zurima McKinney
1997-03-22  0:00                     ` Robert Dewar
1997-03-21  0:00                 ` Tom Moran
1997-03-23  0:00                   ` Robert Dewar
1997-03-23  0:00                     ` Tom Moran
1997-03-24  0:00                       ` Portable Code (was: CRC in Ada?) Larry Kilgallen
1997-03-24  0:00                     ` CRC in Ada? Robert A Duff
1997-03-24  0:00                       ` Robert A Duff
1997-03-24  0:00                       ` Robert Dewar
1997-03-24  0:00                       ` Larry Kilgallen
1997-03-24  0:00                         ` Robert A Duff
1997-03-25  0:00                     ` Robert I. Eachus
1997-04-01  0:00                 ` David Emery
1997-03-07  0:00   ` John Apa
1997-03-05  0:00 ` David C. Hoos, Sr.
1997-03-05  0:00 ` Laurent Pautet
1997-03-06  0:00 ` Jon S Anthony
2013-11-14 17:39 ` david
2013-11-14 18:55   ` Adam Beneschan
2013-11-14 19:35   ` tmoran
2013-11-14 20:09   ` Dmitry A. Kazakov
2013-11-14 20:40   ` John B. Matthews
  -- strict thread matches above, loose matches on Subject: below --
1997-03-13  0:00 tmoran
1997-03-13  0:00 ` Robert Dewar
1997-03-14  0:00   ` Tom Moran
1997-03-14  0:00   ` Joakim Olsson
1997-03-15  0:00   ` Tom Moran
1997-03-14  0:00 ` Jon S Anthony
1997-03-14  0:00 ` Richard A. O'Keefe
replies disabled

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