bug-guile
[Top][All Lists]
Advanced

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

Re: Serious performance issues with 1.9.0


From: Martin Ward
Subject: Re: Serious performance issues with 1.9.0
Date: Fri, 17 Jul 2009 18:27:00 +0100
User-agent: KMail/1.8.2

Now here's something totally wierd with Guile 1.8.7:

echo '(load "ALL.scm")(load "prog_to_spec_TEST.scx")(exit)' | /usr/bin/time 
guile

takes 139 seconds CPU time.

/usr/bin/time guile -l ALL.scm -s prog_to_spec_TEST.scx

takes only 56 seconds CPU time.

You read that right: if I pass the files on the command line
it takes less than half the time to process, compared to typing "load"
commands at the prompt, or sending them to standard input.

The same thing happens with Guile 1.9.1:

Echo load commands to stdin: 301 seconds CPU time
Pass the files on the command line: 150 seconds CPU time.

Still nothing appearing in ~/.cache though.

This problem seems to apply to all files:
for example, the file below takes 140 seconds CPU time
when run via echo '("load file.scm")' | guile
and only 46 seconds when run via guile -s file.scm

For Guile 1.8.7 the times are 75 seconds and 31 seconds respectively.

Here is the code I used for the second test:


(define (force-output) #t)
(define /i '())
(define (@fib /n)
  (if (<= /n 1)
    1
    (+ (@fib (- /n 1)) (@fib (- /n 2)))))

(let ((var-save /i) (for-step 1) (for-end 35))
  (set! /i 1)
  (let for-loop ()
    (cond ((or (and (> 1 0) (<= /i for-end))
               (and (< 1 0) (>= /i for-end)))
           (begin
             (display "fib(")
             (begin
               (display /i)
               (begin
                 (display ") = ")
                 (begin
                   (display (@fib /i))
                   (newline)
                   (force-output)))))
           (set! /i (+ /i for-step))
           (for-loop))
          (#t #t)))
  (set! /i var-save))

(exit)




-- 
                        Martin

address@hidden http://www.cse.dmu.ac.uk/~mward/ Erdos number: 4
G.K.Chesterton web site: http://www.cse.dmu.ac.uk/~mward/gkc/




reply via email to

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