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.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,865c3d125a8dbc3b X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!postnews.google.com!t21g2000yqi.googlegroups.com!not-for-mail From: Maciej Sobczak Newsgroups: comp.lang.ada Subject: Re: Howto read line from a stream Date: Wed, 3 Jun 2009 14:41:11 -0700 (PDT) Organization: http://groups.google.com Message-ID: <6146a252-71e5-4aaf-9a2b-c8ee87b7c9a4@t21g2000yqi.googlegroups.com> References: <83317a97-dae5-4c84-a1ac-88a87833cf3f@q14g2000vbn.googlegroups.com> <1a90e055-44a3-4d00-b4cd-64798c731a55@e24g2000vbe.googlegroups.com> <709e8a12-f967-43db-b76b-4852cf1db08b@v4g2000vba.googlegroups.com> NNTP-Posting-Host: 83.78.73.4 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: posting.google.com 1244065271 8019 127.0.0.1 (3 Jun 2009 21:41:11 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Wed, 3 Jun 2009 21:41:11 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: t21g2000yqi.googlegroups.com; posting-host=83.78.73.4; posting-account=bMuEOQoAAACUUr_ghL3RBIi5neBZ5w_S User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.0.10) Gecko/2009042315 Firefox/3.0.10,gzip(gfe),gzip(gfe) Xref: g2news2.google.com comp.lang.ada:6195 Date: 2009-06-03T14:41:11-07:00 List-Id: On 3 Cze, 20:04, "Jeffrey R. Carter" wrote: > I don't really care which one is faster. The question is whether they meet the > timing requirements for the application. The typical requirement is that your application must be faster then the competition, otherwise you go out of business. Do not assume that everybody is coding against the specification which is given up-front. This might be true when doing contract work (ie. responding to demand), but not when pushing a new product on the market (ie. creating a demand). In any case (performance aside), I find the idea of linear recursion on each single character in the string a bit... bizarre, especially in the context of the *externally* provided content. The memory requirements for your version are also not easy to establish in any intuitive way - the concatenation of return values is probably performed on the heap and at the same time control flow pushes down the stack. Yuck! :-) -- Maciej Sobczak * www.msobczak.com * www.inspirel.com Database Access Library for Ada: www.inspirel.com/soci-ada