[mercury-users] a question on efficient parsing of a file

Vladimir Gubarkov xonixx at gmail.com
Tue May 18 20:44:42 AEST 2010


On Tue, May 18, 2010 at 4:52 AM, Peter Wang <novalazy at gmail.com> wrote:

> On 2010-05-17, Vladimir Gubarkov <xonixx at gmail.com> wrote:
> >
> > But! It seems that io library provides no support for buffered reading
> Oo.
> > And without that, I guess, it'll be rather slow (reading 1 char at a
> time).
> > Interesting, that I've looked inside the source of io module and it
> > internally uses buffered reading, but predicates not exported to
> interface
> > of those.
>
> io.read_char calls getc() eventually, which is buffered by the C
> library.
>

I believe you are right. But I'd like to have an ability to set the size of
a buffer.


> I suppose you mean we have no predicate to read up to 'n'
> bytes/characters at a time.  We should probably add one.
>
>
Yes.. Those will be helpful


> Peter
> --------------------------------------------------------------------------
> mercury-users mailing list
> Post messages to:       mercury-users at csse.unimelb.edu.au
> Administrative Queries: owner-mercury-users at csse.unimelb.edu.au
> Subscriptions:          mercury-users-request at csse.unimelb.edu.au
> --------------------------------------------------------------------------
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurylang.org/archives/users/attachments/20100518/9f2ac594/attachment.html>


More information about the users mailing list