From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Thien-Thi Nguyen Newsgroups: gmane.lisp.guile.devel Subject: Re: Extremly slow for format & string-join Date: Mon, 01 Apr 2013 12:37:38 +0200 Message-ID: <871uaucz9p.fsf@zigzag.favinet> References: <1364788801.4639.6.camel@Renee-desktop.suse> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" X-Trace: ger.gmane.org 1364812528 12516 80.91.229.3 (1 Apr 2013 10:35:28 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 1 Apr 2013 10:35:28 +0000 (UTC) To: guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Mon Apr 01 12:35:56 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 1UMc5k-0001Fb-Bv for guile-devel@m.gmane.org; Mon, 01 Apr 2013 12:35:56 +0200 Original-Received: from localhost ([::1]:39427 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UMc5L-0001cL-G8 for guile-devel@m.gmane.org; Mon, 01 Apr 2013 06:35:31 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:36767) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UMc5C-0001aJ-Bg for guile-devel@gnu.org; Mon, 01 Apr 2013 06:35:28 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UMc5A-0003sk-Ns for guile-devel@gnu.org; Mon, 01 Apr 2013 06:35:22 -0400 Original-Received: from smtp207.alice.it ([82.57.200.103]:47249) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UMc5A-0003sa-EG for guile-devel@gnu.org; Mon, 01 Apr 2013 06:35:20 -0400 Original-Received: from zigzag.favinet (79.44.69.214) by smtp207.alice.it (8.6.060.15) id 51239AD70631065A for guile-devel@gnu.org; Mon, 1 Apr 2013 12:35:18 +0200 Original-Received: from ttn by zigzag.favinet with local (Exim 4.72) (envelope-from ) id 1UMc7Y-0001qs-B5 for guile-devel@gnu.org; Mon, 01 Apr 2013 12:37:48 +0200 In-Reply-To: <1364788801.4639.6.camel@Renee-desktop.suse> (Nala Ginrut's message of "Mon, 01 Apr 2013 12:00:01 +0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 82.57.200.103 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:16091 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable () Nala Ginrut () Mon, 01 Apr 2013 12:00:01 +0800 (define (str* str n) (format #f "~{~a~}" (make-list n str))) (define (str* str n) (string-join (make-list n str) "")) Here's another implementation, using SRFI 13 =E2=80=98xsubstring=E2=80=99: (define (str* str n) (xsubstring str 0 (* n (string-length str)))) I wonder how it fares. =2D-=20 Thien-Thi Nguyen GPG key: 4C807502 --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iEYEARECAAYFAlFZY3YACgkQZwMiJEyAdQIYZwCePNSSDsgwGF/agy+qPflbGOFM TnEAnRy2piU2ajbcqclFfnGdaIF4RWrI =qzOi -----END PGP SIGNATURE----- --=-=-=--