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!news2.google.com!Xl.tags.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local2.nntp.dca.giganews.com!nntp.sun.com!news.sun.com.POSTED!not-for-mail NNTP-Posting-Date: Thu, 03 Sep 2009 03:13:53 -0500 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> <4a967b33$0$32671$9b4e6d93@newsspool2.arcor-online.net> <4a9d06b9$0$30234$9b4e6d93@newsspool1.arcor-online.net> <4a9e3051$0$30220$9b4e6d93@newsspool1.arcor-online.net> From: Ole-Hjalmar Kristensen Organization: Sun Microsystems Date: 03 Sep 2009 10:13:52 +0200 Message-ID: User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/21.2 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cache-Post-Path: news1nwk!unknown@khepri42.norway.sun.com X-Cache: nntpcache 3.0.1 (see http://www.nntpcache.org/) X-Usenet-Provider: http://www.giganews.com X-Trace: sv3-WwNPwgif7VKjts7sJQ3ZG7nxgKehfn1UqwAGLStGBl75A/qrRpL0HBxrapb5lILNsUHBhilli0NZcjq!IwaBJcFUzfmdXII28awtbZ/waF2eOa/Qy9rcirU1c7nlBHh++FUpJA6i X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.39 Xref: g2news2.google.com comp.lang.ada:8122 Date: 2009-09-03T10:13:52+02:00 List-Id: >>>>> "GB" == Georg Bauhaus writes: GB> Ole-Hjalmar Kristensen wrote: >>>>>>> "GB" == Georg Bauhaus writes: >> >> I think the problem is not the explicit copy which happens when we hit >> the end of the buffer (easily verified, just increase the buffer size >> 10 times, the copying will happen 1/10 of the time, but execution time >> stays the same), but the implicit copy which seems to happen in the statement >> return In_Buf(Start..I-1); I do not know if this copy is unavoidable, >> or if the compiler could have optimized it away. GB> It looks like copying In_Buf(Start..I-1) be circumvented. GB> I have added a solution to Line_IO. How did you avoid the copying? -- C++: The power, elegance and simplicity of a hand grenade.