Re: reading a file into a string on ACL

Martin Elster <[email protected]>
Newsgroups gmane.lisp.allegro
Message-ID <[email protected]>
On Fri, 2003-10-31 at 23:11, Steve Haflich wrote:
>    From: Martin Elster <[email protected]>
>    
>    When I try to read a file into an array using ACL it is painfully
>    slow. The function I use is this:
> 
> Your algorithm is preposterously slow.  First of all, omitting the
> optional increment argument to vector-push-extend says you don't care
> whether your algorithm is O^1 or O^2.  The default in ACL6.2 is a mere
> 20, but that is appropriate only for code that rarely experiences
> overflows.  (The default has been changed in ACL 7.0 to the current
> length of the array which is probably what cmucl does, but still,
> depending on this kind of _unspecified_ performance behavior is
> unwise.  There are too many places in the definition of CL where
> performance is not specified, and moreover, it is not obvious.)

Ah, ok. Increasing the increment argument dramatically increases
performance. I should have read the documentation more carefully. 

Thanks for the tips and your quick response. 

Martin
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.