[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Extremly slow for format & string-join
From: |
Daniel Hartwig |
Subject: |
Re: Extremly slow for format & string-join |
Date: |
Mon, 1 Apr 2013 15:02:43 +0800 |
On 1 April 2013 14:58, Nala Ginrut <address@hidden> wrote:
> On Mon, 2013-04-01 at 13:35 +0800, Daniel Hartwig wrote:
>> 2013/4/1 Nala Ginrut <address@hidden>:
>> > Anyway, string-join is so slowly beyond my expectation.
>>
>> Also note that ‘string-concatenate’ (less general than ‘string-join’)
>> performs better for the same case, you could use that directly instead
>> of my prior suggestion for similar results. Especially since you do
>> not desire the additional delimiter handling of ‘string-join’.
>>
>
> hmm...seems not...
>
> --------------------------cut------------------------------
> scheme@(guile-user)> (define a (make-list 1000000 "asdfadsfadsf"))
> scheme@(guile-user)> ,time (define b (apply string-concatenate a))
> While executing meta-command:
> ERROR: Throw to key `vm-error' with args `(vm-run "VM: Stack
> overflow" ())'.
> scheme@(guile-user)> ,time (define b (apply string-concatenate
> (make-list 100000 "sadfadsfaf"))
> ... )
> Aborted
> --------------------------end------------------------------
>
It seems you are trying to use ‘string-concatenate’ like
‘string-append’. That should be:
(string-concatenate (make-list n str))
Re: Extremly slow for format & string-join, Mark H Weaver, 2013/04/01
Re: Extremly slow for format & string-join, Thien-Thi Nguyen, 2013/04/01