guile-user
[Top][All Lists]
Advanced

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

string vs list processing


From: Sascha Ziemann
Subject: string vs list processing
Date: 16 Apr 2001 14:24:48 +0200
User-agent: Gnus/5.0803 (Gnus v5.8.3) Emacs/20.6

Hi,

I did some simple speed test with the get-internal-run-time function
and got the following result:

(let* ((s "abcdef")
       (l (string->list s))
       (ss (string-append s s s s s s s s s s s s s s s s))
       (ll (append        l l l l l l l l l l l l l l l l)))
  (compare-run-time 100000
    (string-append s s)
    (append l l)
    (string-append ss ss)
    (append ll ll)))
;;   1.79 seconds for 100000 times (string-append s s)
;;   1.48 seconds for 100000 times (append l l)
;;  14.74 seconds for 100000 times (string-append ss ss)
;;   5.43 seconds for 100000 times (append ll ll)

Is it right, that in Guile list processing is much faster than string
processing?  Or is it possible that the above result could be caused
by the way I have compiled or installed Guile?

bis später...
Sascha

-- 
Ein Hoch auf den 7. Juni 2000

Attachment: perf.scm
Description: Binary data


reply via email to

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