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,FREEMAIL_FROM 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 Path: g2news2.google.com!postnews.google.com!u16g2000yqe.googlegroups.com!not-for-mail From: Gautier write-only Newsgroups: comp.lang.ada Subject: Re: Ada Shootout program for K-Nucleotide (patches) Date: Sat, 1 Aug 2009 08:37:20 -0700 (PDT) Organization: http://groups.google.com Message-ID: References: <4a743343$0$32674$9b4e6d93@newsspool2.arcor-online.net> <0c18b36c-7af0-454c-8208-9b0416111a1f@w41g2000yqb.googlegroups.com> NNTP-Posting-Host: 83.222.152.124 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1249141040 12110 127.0.0.1 (1 Aug 2009 15:37:20 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Sat, 1 Aug 2009 15:37:20 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: u16g2000yqe.googlegroups.com; posting-host=83.222.152.124; posting-account=gRqrnQkAAAAC_02ynnhqGk1VRQlve6ZG User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.0.11) Gecko/2009060215 Firefox/3.0.11,gzip(gfe),gzip(gfe) Xref: g2news2.google.com comp.lang.ada:7506 Date: 2009-08-01T08:37:20-07:00 List-Id: On 1 Aug., 17:21, Ludovic Brenta : > I note that both Martin and yourself use Ada.Text_IO (especially > Read_Line) which is notoriously slow. =A0I 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. =A0That should be faster. > > (the shootout rules state that the program must read "line by line" > but that does not make sense since Unix has no concept of a line and > all programs must therefore read and parse each byte to detect ends of > lines). Some Ada shootout programs also use GNAT.IO, it might help. _________________________________________________________ Gautier's Ada programming -- http://sf.net/users/gdemont/ NB: For a direct answer, e-mail address on the Web site!