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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,3a6a9f1d654285ba X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news3.google.com!feeder.news-service.com!npeer.de.kpn-eurorings.net!npeer-ng0.de.kpn-eurorings.net!newsfeed.arcor.de!newsspool4.arcor-online.net!news.arcor.de.POSTED!not-for-mail Date: Thu, 27 Aug 2009 14:25:22 +0200 From: Georg Bauhaus User-Agent: Thunderbird 2.0.0.23 (Macintosh/20090812) MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Ada Shootout program for K-Nucleotide (patches) References: <4a743343$0$32674$9b4e6d93@newsspool2.arcor-online.net> <0c18b36c-7af0-454c-8208-9b0416111a1f@w41g2000yqb.googlegroups.com> <4a758ce2$0$31338$9b4e6d93@newsspool4.arcor-online.net> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Message-ID: <4a967b33$0$32671$9b4e6d93@newsspool2.arcor-online.net> Organization: Arcor NNTP-Posting-Date: 27 Aug 2009 14:25:23 CEST NNTP-Posting-Host: 26bd3c74.newsspool2.arcor-online.net X-Trace: DXC=GO@chP2mGXa]BlmkiiU@BiA9EHlD;3Ycb4Fo<]lROoRa^YC2XCjHcbi19?[;VGd>Jd;9OJDO8_SKfNSZ1n^B98ijBNJOko>lT;d X-Complaints-To: usenet-abuse@arcor.de Xref: g2news2.google.com comp.lang.ada:8017 Date: 2009-08-27T14:25:23+02:00 List-Id: Ole-Hjalmar Kristensen schrieb: > Character'read could very well be slower if there is no buffering > involved. The way to read efficiently is to read a large buffer > (multiple of disk block size) and chop it into lines yourself. > Indeed, stream attributes won't help. However, replacing Text_IO.Get_Line---which we use now--- might still be considered controversial: - Is "chopping" an acceptable interpretation of "read line by line"? - writing a correct double buffering scheme (or a buffer with end-of-buffer triggers for Read_A_Line_From_Buffer) is still a bit of work, unless there is something we could copy. A package containing a quick getline will definitely be useful in general Unix programming, I should think. What is being used in the Socket packages, BTW? Equally useful will be a package for fast unbounded strings. Replace_Slice is what prevents showcasing GNAT's Spitbol pattern matching as one of the fastest things on this planet!