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=0.7 required=5.0 tests=BAYES_00,MSGID_RANDY autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,95c23095599677a5 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-01-21 19:32:02 PST Path: supernews.google.com!sn-xit-03!supernews.com!cyclone-sjo1.usenetserver.com!news-out.usenetserver.com!feed2.onemain.com!feed1.onemain.com!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!nntp2.deja.com!nnrp1.deja.com!not-for-mail From: dvdeug@my-deja.com Newsgroups: comp.lang.ada Subject: Re: Optimization Question Date: Mon, 22 Jan 2001 03:22:44 GMT Organization: Deja.com Message-ID: <94g920$k64$1@nnrp1.deja.com> References: <94ftfu$b59$1@nnrp1.deja.com> <94g431$ge3$1@nnrp1.deja.com> NNTP-Posting-Host: 139.78.80.137 X-Article-Creation-Date: Mon Jan 22 03:22:44 2001 GMT X-Http-User-Agent: Mozilla/4.76 [en] (X11; U; Linux 2.4.0 i686; Nav) X-Http-Proxy: 1.0 x64.deja.com:80 (Squid/1.1.22) for client 139.78.80.137 X-MyDeja-Info: XMYDJUIDdvdeug Xref: supernews.google.com comp.lang.ada:4293 Date: 2001-01-22T03:22:44+00:00 List-Id: In article <94g431$ge3$1@nnrp1.deja.com>, Robert Dewar wrote: > In article <94ftfu$b59$1@nnrp1.deja.com>, > dvdeug@my-deja.com wrote: > > <> > > I am *amazed* that this is only ten times slower when the > I/O is done in such a perfectly gruesome manner (sequential > I/O instantiated on bytes). > > It is elementary that you want to read big chunks of a file > at a time. What GNAT does is to read the entire source of > a program in one read statement. Actually, it's only about 3-5 times slower, after doing more careful measurements. I think GNU strings might be too wrapped up in the details of object code to be a good general purpose strings program. Unfortunately, that "perfectly gruesome manner" is the only one that jumps out at me. I don't want to use Ada.Text_IO, because I want control of CR's and LF's. I don't see how to use Sequential I/O on larger chunks, as I may end up with a piece of file that doesn't fill a chunk. Direct I/O can't be faster than sequential I/O. And reading a 17GB file into memory doesn't seem like a good idea. -- David Starner - dstarner98@aasaa.ofe.org Sent via Deja.com http://www.deja.com/