diff --git a/collects/tests/mzscheme/benchmarks/common/auto.ss b/collects/tests/mzscheme/benchmarks/common/auto.ss index 5c1c61b84e..a528bd52a0 100755 --- a/collects/tests/mzscheme/benchmarks/common/auto.ss +++ b/collects/tests/mzscheme/benchmarks/common/auto.ss @@ -456,7 +456,7 @@ exec mzscheme -qu "$0" ${1+"$@"} run-guile extract-guile-times void - '(dynamic dynamic2)) + '(ctak)) )) (define obsolte-impls '(mzscheme3m mzschemecgc mzscheme-j mzschemecgc-j mzschemecgc-tl mzc mz-old)) diff --git a/collects/tests/mzscheme/benchmarks/common/guile-prelude.sch b/collects/tests/mzscheme/benchmarks/common/guile-prelude.sch index f9e61fb5d1..4c1203e0fc 100644 --- a/collects/tests/mzscheme/benchmarks/common/guile-prelude.sch +++ b/collects/tests/mzscheme/benchmarks/common/guile-prelude.sch @@ -15,7 +15,7 @@ (display " system: ") (display (msecs (- (tms:stime end) (tms:stime start)))) (display " real: ") - (display (msecs (- (tms:stime end) (tms:stime start)))) + (display (msecs (- (tms:clock end) (tms:clock start)))) (display " gc: ") (display (msecs (- end-gc start-gc))) (newline))))) diff --git a/collects/tests/mzscheme/benchmarks/common/index-template.html b/collects/tests/mzscheme/benchmarks/common/index-template.html index 7f49f71c0c..eb81e28a3f 100644 --- a/collects/tests/mzscheme/benchmarks/common/index-template.html +++ b/collects/tests/mzscheme/benchmarks/common/index-template.html @@ -12,8 +12,8 @@ fastest run shown on the left. So, by default, 1 is the fastest, but select any implementation to normalize the table with respect - to that implementation's speed. A - appears when a - benchmark didn't run in an implementation for some reason (possibly + to that implementation’s speed. A - appears when a + benchmark didn’t run in an implementation for some reason (possibly not a good one).

@@ -21,12 +21,12 @@ The compilers-only page shows just the compilers among the tested implementations. For those results, the small gray numbers are (relative) compile times, where the compile time for the nothing benchmark is subtracted from -every other benchmark's compile time.

+every other benchmark’s compile time.

Run times are averaged over three runs for compilers or one run for interpreters. All reported times are CPU time (system plus user). The times are based on the output of the - implementation's time syntactic form or similar + implementation’s time syntactic form or similar functions.

Machine: @@ -40,24 +40,23 @@ every other benchmark's compile time.

  • Chicken (4.3.0): -no-trace -no-lambda-info -optimize-level 3 -block -lambda-lift
  • Gambit (4.6.0): (declare (block) (standard-bindings) (extended-bindings) (safe) (interrupts-enabled)), compiled and run with -:m10000
  • -
  • Guile (1.8.7): load
  • +
  • Guile (1.9.7): load
  • Ikarus (0.0.4-rc1+ rev 1870): in R6RS library
  • Larceny (0.97): in R6RS library
  • MIT (7.7.90+): (declare (usual-integrations)); run with --heap 12000
  • Petite Chez (7.4d): load
  • PLT (4.2.4): in module; for benchmarks that use set-car! and set-cdr!, - PLT's R5RS support is used
  • + PLT’s R5RS support is used
  • Scheme48 (1.8): load after ,bench on
  • These configurations are all “safe mode,” but they allow a compiler to assume that built-in Scheme functions are not redefined and that no top-level defintion is ever changed. Such assumptions -correspond to putting the benchmark in an R6RS library.

    - -

    In general, we attempt to use the various implementations in a compentent way, - but not in a sophisticated way. For example, we do not tweak - inlining parameters or specify fixnum arithmetic (where appropriate), - which could produce significant improvements from some compilers.

    +correspond to putting the benchmark in an R6RS library. We attempt to +use the various implementations in a compentent way, but not in a +sophisticated way. For example, we do not tweak inlining parameters or +specify fixnum arithmetic (where appropriate), which could produce +significant improvements from some compilers.

    For more benchmarks and a more sophisticated use of a few compilers, including fixnum- and flonum-specific arithmetic as well as unsafe modes, diff --git a/collects/tests/mzscheme/benchmarks/shootout/mandelbrot-unsafe.ss b/collects/tests/mzscheme/benchmarks/shootout/mandelbrot-unsafe.ss index 2fb31190e9..1701322ce3 100644 --- a/collects/tests/mzscheme/benchmarks/shootout/mandelbrot-unsafe.ss +++ b/collects/tests/mzscheme/benchmarks/shootout/mandelbrot-unsafe.ss @@ -4,10 +4,15 @@ ;; ;; Derived from the Chicken variant, which was ;; Contributed by Anthony Borla - +;; +;; This version uses unsafe operations + #lang scheme/base (require scheme/cmdline - scheme/unsafe/ops) + scheme/require (for-syntax scheme/base) + (filtered-in + (lambda (name) (regexp-replace #rx"unsafe-" name "")) + scheme/unsafe/ops)) (define +limit-sqr+ 4.0) @@ -16,15 +21,15 @@ ;; ------------------------------- (define (mandelbrot x y n ci) - (let ((cr (unsafe-fl- (unsafe-fl/ (unsafe-fl* 2.0 (unsafe-fx->fl x)) (unsafe-fx->fl n)) 1.5))) + (let ((cr (fl- (fl/ (fl* 2.0 (fx->fl x)) (fx->fl n)) 1.5))) (let loop ((i 0) (zr 0.0) (zi 0.0)) - (if (unsafe-fx> i +iterations+) + (if (fx> i +iterations+) 1 (cond - ((unsafe-fl> (unsafe-fl+ (unsafe-fl* zr zr) (unsafe-fl* zi zi)) +limit-sqr+) 0) - (else (loop (unsafe-fx+ 1 i) - (unsafe-fl+ (unsafe-fl- (unsafe-fl* zr zr) (unsafe-fl* zi zi)) cr) - (unsafe-fl+ (unsafe-fl* 2.0 (unsafe-fl* zr zi)) ci)))))))) + ((fl> (fl+ (fl* zr zr) (fl* zi zi)) +limit-sqr+) 0) + (else (loop (fx+ 1 i) + (fl+ (fl- (fl* zr zr) (fl* zi zi)) cr) + (fl+ (fl* 2.0 (fl* zr zi)) ci)))))))) ;; ------------------------------- @@ -35,23 +40,23 @@ (let loop-y ((y 0)) - (when (unsafe-fx< y n) + (when (fx< y n) - (let ([ci (unsafe-fl- (unsafe-fl/ (unsafe-fl* 2.0 (unsafe-fx->fl y)) (unsafe-fx->fl n)) 1.0)]) + (let ([ci (fl- (fl/ (fl* 2.0 (fx->fl y)) (fx->fl n)) 1.0)]) (let loop-x ((x 0) (bitnum 0) (byteacc 0)) - (if (unsafe-fx< x n) - (let ([bitnum (unsafe-fx+ 1 bitnum)] - [byteacc (unsafe-fx+ (unsafe-fxlshift byteacc 1) + (if (fx< x n) + (let ([bitnum (fx+ 1 bitnum)] + [byteacc (fx+ (fxlshift byteacc 1) (mandelbrot x y n ci))]) (cond - ((unsafe-fx= bitnum 8) + ((fx= bitnum 8) (write-byte byteacc out) - (loop-x (unsafe-fx+ 1 x) 0 0)) + (loop-x (fx+ 1 x) 0 0)) - [else (loop-x (unsafe-fx+ 1 x) bitnum byteacc)])) + [else (loop-x (fx+ 1 x) bitnum byteacc)])) (begin (when (positive? bitnum)