[Top][All Lists]

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

Re: drain-input

From: Rob Browning
Subject: Re: drain-input
Date: Wed, 29 Aug 2001 23:25:38 -0500
User-agent: Gnus/5.090004 (Oort Gnus v0.04) Emacs/20.7

"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 :>

(Hmm -- /me is wondering what the scm_ equivalent of gh_str2scm is --
 have to go look.)

Rob Browning
rlb,, and
GPG=1C58 8B2C FB5E 3F64 EA5C  64AE 78FE E5FE F0CB A0AD

reply via email to

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