Guile Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Faster reading
On Tue, 10 Nov 1998 merry::satchell@hermes.dra.hmg.gb wrote:
> If I/O is an overhead when loading files, why not just slurp the whole
> thing in one go by using read (the c read, not the scheme one).
> if((file = fopen(filename, "r")) == NULL)
No-no-no. If you're going to effectively roll your own buffering, at
least push aside libc's. ie. Go one step lower in the hierarchy use
open() and read() rather than fopen and fread.
But yes, on modern systems going stat(),open(),read() the whole damn
thing works actually very well on source code.
John Carter EMail: ece@dwaf-hri.pwv.gov.za
Telephone : 27-12-808-0374x194 Fax:- 27-12-808-0338
<http://www.geocities.com/SoHo/Cafe/5947> or <http://iwqs.pwv.gov.za>
Suicide is the evolutionary force responsible for this current crop of
brain-dead unrealistically cheerful idiots.
Guile Home |
Main Index |
Thread Index