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: 103376,8de7eedad50552f1 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!newsfeed2.dallas1.level3.net!news.level3.com!newsfeed-00.mathworks.com!nntp.TheWorld.com!not-for-mail From: Robert A Duff Newsgroups: comp.lang.ada Subject: Re: Ada bench : count words Date: 22 Mar 2005 17:58:55 -0500 Organization: The World Public Access UNIX, Brookline, MA Message-ID: References: <87vf7n5njs.fsf@code-hal.de> <423f5813$0$9224$9b4e6d93@newsread4.arcor-online.net> <18arnvu705ly4$.1wz6ybz1jt70y$.dlg@40tude.net> <1q9cx4jt7802s.k45m6mcntl87$.dlg@40tude.net> <1820eab50b57f2fe1c4e8e50bb0f4fe5@netcabo.pt> NNTP-Posting-Host: shell01.theworld.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: pcls4.std.com 1111532335 18874 192.74.137.71 (22 Mar 2005 22:58:55 GMT) X-Complaints-To: abuse@TheWorld.com NNTP-Posting-Date: Tue, 22 Mar 2005 22:58:55 +0000 (UTC) User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Xref: g2news1.google.com comp.lang.ada:9766 Date: 2005-03-22T17:58:55-05:00 List-Id: Stephen Leake writes: > Marius Amado Alves writes: > > >> Text_IO is pretty broken, from both a usability perspective and an > >> efficiency perspective. I normally avoid it, and use pragma Import on > >> the C routines (open, read, etc). Suitably wrapped in a clean > >> interface, of course. > > > > Bob, would you contribute an efficient Read procedure to this benchmark? > > How about Stream_IO? that's closer to the C library, but is Pure Ada. Yes, that makes sense. It's probably quite fast, but I haven't measured it. It's a bit of a pain because you have to deal in Stream_Elements instead of characters. But that shouldn't slow it down -- just makes the source code a little more complicated. - Bob