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!news4.google.com!proxad.net!feeder1-2.proxad.net!u-picardie.fr!news.ecp.fr!news.jacob-sparre.dk!pnx.dk!not-for-mail From: Jacob Sparre Andersen Newsgroups: comp.lang.ada Subject: Re: Ada Shootout program for K-Nucleotide (patches) Date: 03 Aug 2009 10:56:55 +0200 Organization: Jacob Sparre Andersen Sender: sparre@jspa-nykredit Message-ID: <87fxc9e0mg.fsf@nbi.dk> References: <4a743343$0$32674$9b4e6d93@newsspool2.arcor-online.net> <0c18b36c-7af0-454c-8208-9b0416111a1f@w41g2000yqb.googlegroups.com> NNTP-Posting-Host: 79.138.239.46.bredband.3.dk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: munin.nbi.dk 1249289878 15717 79.138.239.46 (3 Aug 2009 08:57:58 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Mon, 3 Aug 2009 08:57:58 +0000 (UTC) User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.4 Xref: g2news2.google.com comp.lang.ada:7536 Date: 2009-08-03T10:56:55+02:00 List-Id: Ludovic Brenta wrote: > I note that both Martin and yourself use Ada.Text_IO (especially > Read_Line) which is notoriously slow. I would use Character'Read > and a finite state machine to detect the portion of the input file > to be processed, then to fill in the buffer. That should be faster. Wouldn't it be even faster to map the data file to a string (using POSIX.Memory_Mapping.Map_Memory), and then "read" from that string? I have a ready-to-use package and demonstration procedure for this purpose on , if somebody is interested. Greetings, Jacob -- "It is a syntax error to write FORTRAN while not wearing a blue tie."