Re: How to improve performance when reading text files?
- From: Norbert_Paul <norbertpauls_spambin@xxxxxxxxx>
- Date: Fri, 25 Jun 2010 08:34:56 +0200
szabolcs.szucs wrote:
Append is the key. Because of you collecting lines into a list whichTrue.
is a simply linked one
(afaik) when appending to the end, you have to iterate over the list
every time. This makes the solution O(n^2).. A somewhat better
solution is to (cons line retval) and return (reverse retval) which
makes stuff linear (O(n)), although consider using arrays.
Even better (faster) is returning (nreverse retval).
.
- Follow-Ups:
- Re: How to improve performance when reading text files?
- From: Tamas K Papp
- Re: How to improve performance when reading text files?
- References:
- How to improve performance when reading text files?
- From: webmasterATflymagnetic.com
- Re: How to improve performance when reading text files?
- From: szabolcs.szucs
- How to improve performance when reading text files?
- Prev by Date: arcall mobile from internet for free
- Next by Date: Re: How to improve performance when reading text files?
- Previous by thread: Re: How to improve performance when reading text files?
- Next by thread: Re: How to improve performance when reading text files?
- Index(es):
Relevant Pages
|