From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Daniel Hartwig Newsgroups: gmane.lisp.guile.devel Subject: Re: Extremly slow for format & string-join Date: Mon, 1 Apr 2013 15:02:43 +0800 Message-ID: References: <1364788801.4639.6.camel@Renee-desktop.suse> <1364793200.4639.10.camel@Renee-desktop.suse> <1364799533.4639.11.camel@Renee-desktop.suse> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1364799773 32226 80.91.229.3 (1 Apr 2013 07:02:53 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 1 Apr 2013 07:02:53 +0000 (UTC) Cc: guile-devel@gnu.org To: Nala Ginrut Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Mon Apr 01 09:03:17 2013 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UMYlv-00080b-Rb for guile-devel@m.gmane.org; Mon, 01 Apr 2013 09:03:15 +0200 Original-Received: from localhost ([::1]:40313 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UMYlX-0000hu-Cf for guile-devel@m.gmane.org; Mon, 01 Apr 2013 03:02:51 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:48815) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UMYlR-0000hl-9P for guile-devel@gnu.org; Mon, 01 Apr 2013 03:02:47 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UMYlP-0004sK-OG for guile-devel@gnu.org; Mon, 01 Apr 2013 03:02:45 -0400 Original-Received: from mail-ia0-x22a.google.com ([2607:f8b0:4001:c02::22a]:37501) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UMYlP-0004sG-IW for guile-devel@gnu.org; Mon, 01 Apr 2013 03:02:43 -0400 Original-Received: by mail-ia0-f170.google.com with SMTP id h8so1680676iaa.1 for ; Mon, 01 Apr 2013 00:02:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type:content-transfer-encoding; bh=9Gwkw6hoQ3e2sc7GMUbzuOLAkQLbiBywhgtXiE6TVSs=; b=X4VoPlDUkFOw1fKM+/XuDzGbr4ABW1NWSg8VS/TIrWyB1/fyy1WCGEA8hsBdqtlFti 3ujjDLSqp3JIgp/kAJWq37P/2rQkQAeRYFRX48f112jMfpOeDHelvusg+oLtS/xNdAb0 qIOKHzGewE+1jqwcL2oMN5Bcvm0sFJ6hb9A7Ca6JQoOFjryPePTctjVOzXqqgRYvJy9/ uS0Or23gcWDDn1J/o2fIlONnnek1zYWaBF6lAQjL5Uyoz2Q04aTtqoueKu1hqY14Nxp3 jDFxUCrrMVJFFTdOhhU5LJ6Oox42h75Feq92Vw1MJtn0fM5m16LypFpNR/u2pXVSZFXF sAoQ== X-Received: by 10.50.36.169 with SMTP id r9mr2978081igj.96.1364799763126; Mon, 01 Apr 2013 00:02:43 -0700 (PDT) Original-Received: by 10.64.26.168 with HTTP; Mon, 1 Apr 2013 00:02:43 -0700 (PDT) In-Reply-To: <1364799533.4639.11.camel@Renee-desktop.suse> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:4001:c02::22a X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:16086 Archived-At: On 1 April 2013 14:58, Nala Ginrut wrote: > On Mon, 2013-04-01 at 13:35 +0800, Daniel Hartwig wrote: >> 2013/4/1 Nala Ginrut : >> > Anyway, string-join is so slowly beyond my expectation. >> >> Also note that =E2=80=98string-concatenate=E2=80=99 (less general than = =E2=80=98string-join=E2=80=99) >> 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 =E2=80=98string-join=E2= =80=99. >> > > 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 =E2=80=98string-concatenate=E2=80=99 like =E2=80=98string-append=E2=80=99. That should be: (string-concatenate (make-list n str))