From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,9c86eb13dd395066 X-Google-Attributes: gid103376,public From: Mark & Zurima McKinney Subject: Re: CRC in Ada? Date: 1997/03/22 Message-ID: <33344C9C.542F@us.net>#1/1 X-Deja-AN: 227563372 References: <1997Mar2.220652@nova.wright.edu> <331bf6ce.2832564@news.logica.co.uk> <332B5EBD.3D9E@worldnet.att.net> <332C9185.61C1@worldnet.att.net> <332F5CC8.6D7C@worldnet.att.net> <33320957.B@worldnet.att.net> Organization: US Net - MD,DC,VA ISP - info@us.net Newsgroups: comp.lang.ada Date: 1997-03-22T00:00:00+00:00 List-Id: Michael Hartsough Wrote >It should not take 20 minutes to read an 8mb file on a 166MHz pentium >PC. >Even if one IS "misusing" sequential_io! I agree. I have worked with several implementations of Ada on several computers. I've run across the same problem. What you're dealing with is a correct but inefficient implementation of sequential_io. In one case I had access to the source of sequential_io, copied it, renamed the package buffered_sequential_io added buffering and used it. Later I ported that sytem to another machine using an Alsys product that allowed the programmer to pass buffering information in the form parameter. .... package Char_io is new Sequential_io (Character); .... Char_Io.Create(Char_File, Char_io.In_File, "Filename", "Buffer_Size => 4096"); -- On Alsys this also works for text_io a lager buffer size will probable improve performance Not completely portable but extreemly effective. We had a 300 MB file that could be read in 1 minute vs the C compiler in 2 Min. Using the Alsys PC compiler I could read the same file in approximatly 6 Minutes using a 90 mz pentium. IMHO Stream_Io may be more appropriate if available. If not sequential_io is a logical choice unfortunately you have a correct but inefficient implementation to use. Mark McKinney