Newsgroups: comp.lang.lisp
Path: cantaloupe.srv.cs.cmu.edu!das-news2.harvard.edu!fas-news.harvard.edu!newspump.wustl.edu!news.ecn.bgu.edu!news.moneng.mei.com!uwm.edu!math.ohio-state.edu!jussieu.fr!univ-lyon1.fr!swidir.switch.ch!scsing.switch.ch!news.dfn.de!news.dkrz.de!news.rrz.uni-hamburg.de!news.Hanse.DE!wavehh.hanse.de!cracauer
From: cracauer@wavehh.hanse.de (Martin Cracauer)
Subject: Re: Q: fast read-line, file I/O in lisp
Message-ID: <1995Mar27.085840.13057@wavehh.hanse.de>
Organization: The Internet
References: <3ku8eu$i11@sunserver.lrz-muenchen.de>
Date: Mon, 27 Mar 95 08:58:40 GMT
Lines: 25

jolo@lft.mw.tu-muenchen.de (Johannes Lorenz) writes:

>i have to read a finite element result file, which contains several thousand
>ouput lines. The standard functions read-char or read-line need to much time
>for that operation.
>Has anybody realized a faster read-line or read-char function in lisp, with a
>performance comparable or equivalent to C getchar.

The dpANS (didn't check for ANSI-CL) included (read-sequence ...) and
(write-sequence ...). They can fill a previously allocated sequence
(array) of fixed length. Should be the raw system call and few else
and therefore as fast as a C call.

CLISP includes this functions. It should be easy to implement as a
foreign C call in other Lisps, since very few checks and no allocation
have to be made beside the system call.

Martin

P.S.: The newsgroups- and/or followup-to: header line of your posting
is not valid.
-- 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Private email Martin.Cracauer@wavehh.hanse.de Fax +4940 522 8536. No NeXTMail!
"As far as I'm concerned, if something is so complicated that you can't ex-
 plain it in 10 seconds, then it's probably not worth knowing anyway" - Calvin
