From: dewar@merv.cs.nyu.edu (Robert Dewar)
Subject: Re: CRC in Ada?
Date: 1997/03/04
Date: 1997-03-04T00:00:00+00:00 [thread overview]
Message-ID: <dewar.857536653@merv> (raw)
In-Reply-To: oslo83b70l.fsf@ted.vigra.com
David Brown:
<<Well, I tried this. I wrote a small program to read files and compute
CRC16's on them. What I found was disheartening. The CRC code didn't
take very long. However, the Stream_IO read of the data was very
slow. I traced it down to doing a call to the C read function for
each byte>>
Are you using stream attributes to read into a string. This is a mistake
that I have seen a number of people make. Why a mistake (if you are
worrying about efficiency?) Because Ada semantics require element by
element processing of arrays (and for a string, the element is a
character).
Instead use Read and Write directly to read and/or write buffers
of stream elements.
<<I'm using GNAT 3.09 on Linux (pentium). Is there anything about the
specification for Stream_IO (or Text_IO for that matter) that is
causing the GNAT runtime to turn off buffering. This is a real
performance hit, and I have had to revert to calling the C routines
directly when streams would be adequate, if they just weren't so
inefficient.>>
As for buffering, I am not sure what the default is, but you can use
setvbuf to control buffering (read the section in the GNAT manual about
getting at the underlying streams).
next prev parent reply other threads:[~1997-03-04 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 ` Tom Moran
1997-03-03 0:00 ` David Brown
1997-03-04 0:00 ` David L Brown
1997-03-04 0:00 ` Robert Dewar [this message]
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 ` Fergus Henderson
1997-03-06 0:00 ` Larry Kilgallen
1997-03-06 0:00 ` Robert A Duff
1997-03-07 0:00 ` Robert Dewar
1997-03-07 0:00 ` Larry Kilgallen
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-10 0:00 ` Jim Balter
1997-03-06 0:00 ` Robert Dewar
1997-03-06 0:00 ` Robert A Duff
1997-03-06 0:00 ` Robert Dewar
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 ` Larry Kilgallen
1997-03-10 0:00 ` Tarjei Jensen
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-10 0:00 ` Robert Dewar
1997-03-10 0:00 ` David Brown
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 ` Larry Kilgallen
1997-03-09 0:00 ` Robert Dewar
1997-03-06 0:00 ` Graham Hughes
1997-03-06 0:00 ` Robert Dewar
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-07 0:00 ` Ole-Hjalmar Kristensen FOU.TD/DELAB
1997-03-07 0:00 ` David Brown
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-10 0:00 ` Ole-Hjalmar Kristensen FOU.TD/DELAB
1997-03-11 0:00 ` Ole-Hjalmar Kristensen FOU.TD/DELAB
1997-03-12 0:00 ` Jim Balter
1997-03-12 0:00 ` Ole-Hjalmar Kristensen FOU.TD/DELAB
1997-03-12 0:00 ` Ole-Hjalmar Kristensen FOU.TD/DELAB
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 Dewar
1997-03-24 0:00 ` Robert A Duff
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-04 0:00 ` Jon S Anthony
1997-03-05 0:00 ` Robert Dewar
1997-03-05 0:00 ` Laurent Pautet
1997-03-05 0:00 ` David C. Hoos, Sr.
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 ` Richard A. O'Keefe
1997-03-14 0:00 ` Jon S Anthony
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox