Testing on different schemes Peter Lane (06 May 2017 12:15 UTC)
Re: Testing on different schemes Per Bothner (06 May 2017 14:31 UTC)
Re: Testing on different schemes Peter Lane (06 May 2017 18:02 UTC)
Re: Testing on different schemes John Cowan (06 May 2017 18:39 UTC)
Re: Testing on different schemes Peter Lane (09 May 2017 15:53 UTC)
Re: Testing on different schemes John Cowan (09 May 2017 19:04 UTC)

Re: Testing on different schemes Peter Lane 09 May 2017 15:53 UTC

As a follow on to the test, I adapted srfi-151.sld to use better
implementations of the core routines, where available.  Kawa, Larceny
and Sagittarius are covered by using (rnrs arithmetic bitwise), and
Gauche has its own base library equivalent to SRFI 60.

With this change all tests still pass, but with substantially better
performance.

Gauche 0.9.6                0.4s
Kawa 2.4                    2.7s
Larceny 0.99                9.7s
Sagittarius 0.8.3           1.95s [2 bignum errors - now fixed]

The updated cond-expand in srfi-151.sld

   (cond-expand
     ;(chibi (include-shared "bit")        ;; not working as yet
     ;       (include "chibi-core.scm"))
     ((library (rnrs arithmetic bitwise))
      (import (only (rnrs arithmetic bitwise)
                    bitwise-arithmetic-shift
                    bitwise-bit-count
                    bitwise-length
                    bitwise-not
                    bitwise-and
                    bitwise-ior
                    bitwise-xor
                    ))
      (begin
        (define arithmetic-shift bitwise-arithmetic-shift)
        (define integer-length bitwise-length)
        (define (bit-count i) ; Note, -ve case different to R6RS
bitwise-bit-count
          (if (>= i 0)
            (bitwise-bit-count i)
            (bitwise-bit-count (bitwise-not i))))))
     (gauche
       (import (only (gauche base)
                     ash logand logior lognot
                     logxor integer-length logcount))
       (begin
         (define arithmetic-shift ash)
         (define bitwise-and logand)
         (define bitwise-ior logior)
         (define bitwise-not lognot)
         (define bitwise-xor logxor)
         ; integer-length defined
         (define bit-count logcount)))
     (else (include "bitwise-core.scm")))

On 06/05/17 13:14, Peter Lane wrote:
> I (trivially) rewrote the chibi test suite to use SRFI 64 and checked
> srfi 151 on the following 5 implementations, in R7RS mode. They all
> passed the test suite.  For interest, I include the running times.
>
> Running times:  (all 558 passes)
>
> chibi (from master)         6m9.853s
> gauche (0.9.6 from master)  4m55.710s
> kawa 2.4                    4m24.362s [with test file split in 2]
> larceny 0.99                37m6.170s
> sagittarius 0.8.3           2m49.283s
>
> Trying to use the chibi part of the cond-expand caused an error,
> ERROR: couldn't find include: "bit.so"
>

--
Peter Lane
http://peterlane.info/scheme.html