[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: drain-input

From: Dale P. Smith
Subject: Re: drain-input
Date: Thu, 30 Aug 2001 01:36:53 -0400

Rob Browning wrote:
> "Dale P. Smith" <address@hidden> writes:
> > I found out (I was playing around and wondered if it would work) that
> > calling read-delimited with "" slurps the whole file.  Was this
> > intended?
> That's what I would have expected it to do -- read until delimiter or
> eof, and if there's no delimiters, then it's gotta be eof.
> What I was wondering, though, was whether or not it was (could be)
> efficient about the reading.  If you know you're going to read the
> entire file, you can just issue 4K or 8K (or whatever) reads until
> they fail.  This will beat getc soundly.
> Heck, in cases where you knew you were reading a real file and
> converting it to a guile string, you could just mmap it and then call
> gh_str2scm.  Now that should be fast :>

I always thought it would be cool to do file i/o with mmap.  Didn't
Keisuki want to use mmap in his vm?  Won't guile try to put a #\nul at
the end the the "string"?

Dale P. Smith
Treasurer, Cleveland Linux Users Group
Senior Systems Consultant, Altus Technologies Corporation
440-746-9000 x309

reply via email to

[Prev in Thread] Current Thread [Next in Thread]