guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Extremly slow for format & string-join


From: Thien-Thi Nguyen
Subject: Re: Extremly slow for format & string-join
Date: Mon, 01 Apr 2013 12:37:38 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux)

() Nala Ginrut <address@hidden>
() 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 ‘xsubstring’:

(define (str* str n)
  (xsubstring str 0 (* n (string-length str))))

I wonder how it fares.

-- 
Thien-Thi Nguyen
GPG key: 4C807502

Attachment: pgpRZ3ck3Ioab.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]