[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Guile is becoming as fast as rep
From: |
Keisuke Nishida |
Subject: |
Guile is becoming as fast as rep |
Date: |
20 Sep 2000 15:06:33 -0400 |
User-agent: |
T-gnus/6.14.4 (based on Gnus v5.8.6) (revision 02) SEMI/1.13.7 (Awazu) Chao/1.14.0 (Momoyama) Emacs/20.7 (i686-pc-linux-gnu) MULE/4.1 (AOI) |
Hello,
I'm a Guile developer, writing a VM and a Scheme compiler for Guile.
John Harper writes:
> Yes, QScheme is fast, especially when calling very small functions
> repeatedly.
>
> However rep often beats it on `normal` code. E.g. here are some
> benchmarks for my favourite `prime` kernel (from librep/lisp/ChangeLog,
> larger numbers = iterations per minute, so larger = faster):
>
> current rep 2580 (1.0)
> qscheme-0.3.3 1860 (.72)
> scheme48-0.53 835 (.32) ; in benchmark mode
> guile-1.4 314 (.12) ; with (debug-disable `debug)
>
> 300MHz mobile Pentium II; code as follows:
>
> (define (prime n)
> (letrec ((primep (lambda (n primes)
> (or (null primes)
> (and (not (zerop (remainder n (car primes))))
> (primep n (cdr primes)))))))
> (let loop ((i 2) (candidate 2) (primes `()))
> (cond ((not (primep candidate primes)) (loop i (+ 1 candidate) primes))
> ((= i n) candidate)
> (t (loop (+ 1 i) (+ 1 candidate) (cons candidate primes)))))))
>
> (define (test)
> (let loop ((count 1))
> (prime 100)
> (format standard-output "%d" count)
> (loop (+ 1 count))))
I tried the same benchmark with the current Guile and my VM:
With byte-compile
current rep 5706 (1.0)
Guile with VM 5451 (.96)
Without byte-compile
current rep 168 (1.0)
current Guile 679 (4.0)
on 600MHz PentiumIII. Hmm, I couldn't beat you...
Anyway, just for your information.
Keisuke Nishida
- Guile is becoming as fast as rep,
Keisuke Nishida <=