From ab282428fea47ddc8c4f5027dbd7b17c7d7066fe Mon Sep 17 00:00:00 2001 From: Abdulaziz Ghuloum Date: Sun, 4 Nov 2007 12:03:32 -0500 Subject: [PATCH] * Fixed benchmarks to work on (rnrs) libraries instead of the old (r6rs) libraries. --- benchmarks/BUGS | 5 +- benchmarks/bench.ss | 2 +- benchmarks/r6rs-benchmarks/dynamic.ss | 5 -- ...{r6rs-benchmarks.ss => rnrs-benchmarks.ss} | 7 +- .../ack.ss | 4 +- .../array1.ss | 4 +- .../boyer.ss | 8 +- .../browse.ss | 8 +- .../cat.ss | 4 +- .../compiler.ss | 4 +- .../conform.ss | 10 +-- .../cpstak.ss | 4 +- .../ctak.ss | 4 +- .../dderiv.ss | 4 +- .../deriv.ss | 4 +- .../destruc.ss | 8 +- .../diviter.ss | 4 +- .../divrec.ss | 4 +- .../dynamic.src.ss | 2 +- benchmarks/rnrs-benchmarks/dynamic.ss | 5 ++ .../earley.ss | 4 +- .../fft.ss | 4 +- .../fib.ss | 4 +- .../fibc.ss | 4 +- .../fibfp.ss | 8 +- .../fpsum.ss | 4 +- .../gcbench.ss | 4 +- .../gcold.ss | 4 +- .../graphs.ss | 6 +- .../lattice.ss | 4 +- .../matrix.ss | 4 +- .../maze.ss | 4 +- .../mazefun.ss | 4 +- .../mbrot.ss | 4 +- .../nbody.ss | 10 +-- .../nboyer.ss | 4 +- .../nqueens.ss | 4 +- .../ntakl.ss | 4 +- .../nucleic.ss | 10 +-- .../paraffins.ss | 4 +- .../parsing.ss | 4 +- .../perm9.ss | 4 +- .../peval.ss | 4 +- .../pi.ss | 4 +- .../pnpoly.ss | 4 +- .../primes.ss | 4 +- .../puzzle.ss | 4 +- .../quicksort.ss | 4 +- .../ray.ss | 4 +- .../sboyer.ss | 4 +- .../scheme.ss | 82 ++++++++++--------- .../simplex.ss | 4 +- .../slatex.ss | 14 ++-- .../string.ss | 4 +- .../sum.ss | 4 +- .../sum1.ss | 4 +- .../sumfp.ss | 4 +- .../sumloop.ss | 4 +- .../tail.ss | 4 +- .../tak.ss | 4 +- .../takl.ss | 4 +- .../todo-src/README.flonum-benchmarks | 0 .../todo-src/temp.scm | 0 .../todo-src/temp2.scm | 0 .../todo-src/test.scm | 0 .../trav1.ss | 4 +- .../trav2.ss | 4 +- .../triangl.ss | 4 +- .../wc.ss | 4 +- 69 files changed, 196 insertions(+), 190 deletions(-) delete mode 100644 benchmarks/r6rs-benchmarks/dynamic.ss rename benchmarks/{r6rs-benchmarks.ss => rnrs-benchmarks.ss} (96%) rename benchmarks/{r6rs-benchmarks => rnrs-benchmarks}/ack.ss (85%) rename benchmarks/{r6rs-benchmarks => rnrs-benchmarks}/array1.ss (92%) rename benchmarks/{r6rs-benchmarks => rnrs-benchmarks}/boyer.ss (99%) rename benchmarks/{r6rs-benchmarks => rnrs-benchmarks}/browse.ss (98%) rename benchmarks/{r6rs-benchmarks => rnrs-benchmarks}/cat.ss (90%) rename benchmarks/{r6rs-benchmarks => rnrs-benchmarks}/compiler.ss (99%) rename benchmarks/{r6rs-benchmarks => rnrs-benchmarks}/conform.ss (99%) rename benchmarks/{r6rs-benchmarks => rnrs-benchmarks}/cpstak.ss (92%) rename benchmarks/{r6rs-benchmarks => rnrs-benchmarks}/ctak.ss (92%) rename benchmarks/{r6rs-benchmarks => rnrs-benchmarks}/dderiv.ss (96%) rename benchmarks/{r6rs-benchmarks => rnrs-benchmarks}/deriv.ss (95%) rename benchmarks/{r6rs-benchmarks => rnrs-benchmarks}/destruc.ss (95%) rename benchmarks/{r6rs-benchmarks => rnrs-benchmarks}/diviter.ss (92%) rename benchmarks/{r6rs-benchmarks => rnrs-benchmarks}/divrec.ss (92%) rename benchmarks/{r6rs-benchmarks => rnrs-benchmarks}/dynamic.src.ss (99%) create mode 100644 benchmarks/rnrs-benchmarks/dynamic.ss rename benchmarks/{r6rs-benchmarks => rnrs-benchmarks}/earley.ss (99%) rename benchmarks/{r6rs-benchmarks => rnrs-benchmarks}/fft.ss (96%) rename benchmarks/{r6rs-benchmarks => rnrs-benchmarks}/fib.ss (83%) rename benchmarks/{r6rs-benchmarks => rnrs-benchmarks}/fibc.ss (91%) rename benchmarks/{r6rs-benchmarks => rnrs-benchmarks}/fibfp.ss (75%) rename benchmarks/{r6rs-benchmarks => rnrs-benchmarks}/fpsum.ss (79%) rename benchmarks/{r6rs-benchmarks => rnrs-benchmarks}/gcbench.ss (98%) rename benchmarks/{r6rs-benchmarks => rnrs-benchmarks}/gcold.ss (99%) rename benchmarks/{r6rs-benchmarks => rnrs-benchmarks}/graphs.ss (99%) rename benchmarks/{r6rs-benchmarks => rnrs-benchmarks}/lattice.ss (98%) rename benchmarks/{r6rs-benchmarks => rnrs-benchmarks}/matrix.ss (99%) rename benchmarks/{r6rs-benchmarks => rnrs-benchmarks}/maze.ss (99%) rename benchmarks/{r6rs-benchmarks => rnrs-benchmarks}/mazefun.ss (98%) rename benchmarks/{r6rs-benchmarks => rnrs-benchmarks}/mbrot.ss (93%) rename benchmarks/{r6rs-benchmarks => rnrs-benchmarks}/nbody.ss (99%) rename benchmarks/{r6rs-benchmarks => rnrs-benchmarks}/nboyer.ss (99%) rename benchmarks/{r6rs-benchmarks => rnrs-benchmarks}/nqueens.ss (93%) rename benchmarks/{r6rs-benchmarks => rnrs-benchmarks}/ntakl.ss (94%) rename benchmarks/{r6rs-benchmarks => rnrs-benchmarks}/nucleic.ss (99%) rename benchmarks/{r6rs-benchmarks => rnrs-benchmarks}/paraffins.ss (98%) rename benchmarks/{r6rs-benchmarks => rnrs-benchmarks}/parsing.ss (99%) rename benchmarks/{r6rs-benchmarks => rnrs-benchmarks}/perm9.ss (98%) rename benchmarks/{r6rs-benchmarks => rnrs-benchmarks}/peval.ss (99%) rename benchmarks/{r6rs-benchmarks => rnrs-benchmarks}/pi.ss (99%) rename benchmarks/{r6rs-benchmarks => rnrs-benchmarks}/pnpoly.ss (95%) rename benchmarks/{r6rs-benchmarks => rnrs-benchmarks}/primes.ss (93%) rename benchmarks/{r6rs-benchmarks => rnrs-benchmarks}/puzzle.ss (98%) rename benchmarks/{r6rs-benchmarks => rnrs-benchmarks}/quicksort.ss (96%) rename benchmarks/{r6rs-benchmarks => rnrs-benchmarks}/ray.ss (98%) rename benchmarks/{r6rs-benchmarks => rnrs-benchmarks}/sboyer.ss (99%) rename benchmarks/{r6rs-benchmarks => rnrs-benchmarks}/scheme.ss (99%) rename benchmarks/{r6rs-benchmarks => rnrs-benchmarks}/simplex.ss (98%) rename benchmarks/{r6rs-benchmarks => rnrs-benchmarks}/slatex.ss (99%) rename benchmarks/{r6rs-benchmarks => rnrs-benchmarks}/string.ss (91%) rename benchmarks/{r6rs-benchmarks => rnrs-benchmarks}/sum.ss (84%) rename benchmarks/{r6rs-benchmarks => rnrs-benchmarks}/sum1.ss (87%) rename benchmarks/{r6rs-benchmarks => rnrs-benchmarks}/sumfp.ss (81%) rename benchmarks/{r6rs-benchmarks => rnrs-benchmarks}/sumloop.ss (89%) rename benchmarks/{r6rs-benchmarks => rnrs-benchmarks}/tail.ss (93%) rename benchmarks/{r6rs-benchmarks => rnrs-benchmarks}/tak.ss (86%) rename benchmarks/{r6rs-benchmarks => rnrs-benchmarks}/takl.ss (91%) rename benchmarks/{r6rs-benchmarks => rnrs-benchmarks}/todo-src/README.flonum-benchmarks (100%) rename benchmarks/{r6rs-benchmarks => rnrs-benchmarks}/todo-src/temp.scm (100%) rename benchmarks/{r6rs-benchmarks => rnrs-benchmarks}/todo-src/temp2.scm (100%) rename benchmarks/{r6rs-benchmarks => rnrs-benchmarks}/todo-src/test.scm (100%) rename benchmarks/{r6rs-benchmarks => rnrs-benchmarks}/trav1.ss (98%) rename benchmarks/{r6rs-benchmarks => rnrs-benchmarks}/trav2.ss (98%) rename benchmarks/{r6rs-benchmarks => rnrs-benchmarks}/triangl.ss (96%) rename benchmarks/{r6rs-benchmarks => rnrs-benchmarks}/wc.ss (94%) diff --git a/benchmarks/BUGS b/benchmarks/BUGS index d782e96..413b7fb 100644 --- a/benchmarks/BUGS +++ b/benchmarks/BUGS @@ -1,14 +1,13 @@ * maze needs bitwise-and * quicksort needs bignum modulo. -* scheme needs complex? and other stuff. * compiler needs string-downcase -* nbody needs real-part +* nbody needs real-part, make-polar * ntakl kinda slow * string too slow * nbody does not work -* fibfp does not terminate +* fibfp does not terminate (not anymore) * mbrot too slow * pnpoly kinda slow * sumfp/fpsum too slow diff --git a/benchmarks/bench.ss b/benchmarks/bench.ss index 25d4ffa..5702628 100755 --- a/benchmarks/bench.ss +++ b/benchmarks/bench.ss @@ -7,7 +7,7 @@ (lambda () (eval 'main (environment - (list 'r6rs-benchmarks name)))))]) + (list 'rnrs-benchmarks name)))))]) (proc))) (apply diff --git a/benchmarks/r6rs-benchmarks/dynamic.ss b/benchmarks/r6rs-benchmarks/dynamic.ss deleted file mode 100644 index 6aeb22d..0000000 --- a/benchmarks/r6rs-benchmarks/dynamic.ss +++ /dev/null @@ -1,5 +0,0 @@ - -(library (r6rs-benchmarks dynamic) - (export main) - (import (r6rs) (r6rs mutable-pairs) (r6rs-benchmarks)) - (include-source "dynamic.src.ss")) diff --git a/benchmarks/r6rs-benchmarks.ss b/benchmarks/rnrs-benchmarks.ss similarity index 96% rename from benchmarks/r6rs-benchmarks.ss rename to benchmarks/rnrs-benchmarks.ss index 7305fac..06e6d88 100644 --- a/benchmarks/r6rs-benchmarks.ss +++ b/benchmarks/rnrs-benchmarks.ss @@ -1,5 +1,5 @@ -(library (r6rs-benchmarks) +(library (rnrs-benchmarks) (export run-benchmark fatal-error include-source call-with-output-file/truncate ack-iters @@ -27,8 +27,10 @@ graphs-iters lattice-iters matrix-iters + maze-iters mazefun-iters mbrot-iters + nbody-iters nboyer-iters nqueens-iters nucleic-iters @@ -44,6 +46,7 @@ quicksort-iters ray-iters sboyer-iters + scheme-iters simplex-iters slatex-iters sum-iters @@ -168,6 +171,6 @@ (define quicksort-iters 1) (define fpsum-iters 10) - ;(define nbody-iters 1) ; nondeterministic (order of evaluation) + (define nbody-iters 1) ; nondeterministic (order of evaluation) ) diff --git a/benchmarks/r6rs-benchmarks/ack.ss b/benchmarks/rnrs-benchmarks/ack.ss similarity index 85% rename from benchmarks/r6rs-benchmarks/ack.ss rename to benchmarks/rnrs-benchmarks/ack.ss index 92eadf4..4d73855 100644 --- a/benchmarks/r6rs-benchmarks/ack.ss +++ b/benchmarks/rnrs-benchmarks/ack.ss @@ -1,8 +1,8 @@ ;;; ACK -- One of the Kernighan and Van Wyk benchmarks. -(library (r6rs-benchmarks ack) +(library (rnrs-benchmarks ack) (export main) - (import (r6rs) (r6rs-benchmarks)) + (import (rnrs) (rnrs-benchmarks)) (define (ack m n) (cond ((= m 0) (+ n 1)) diff --git a/benchmarks/r6rs-benchmarks/array1.ss b/benchmarks/rnrs-benchmarks/array1.ss similarity index 92% rename from benchmarks/r6rs-benchmarks/array1.ss rename to benchmarks/rnrs-benchmarks/array1.ss index 442b176..65cd062 100644 --- a/benchmarks/r6rs-benchmarks/array1.ss +++ b/benchmarks/rnrs-benchmarks/array1.ss @@ -1,8 +1,8 @@ ;;; ARRAY1 -- One of the Kernighan and Van Wyk benchmarks. -(library (r6rs-benchmarks array1) +(library (rnrs-benchmarks array1) (export main) - (import (r6rs) (r6rs-benchmarks)) + (import (rnrs) (rnrs-benchmarks)) (define (create-x n) (define result (make-vector n)) diff --git a/benchmarks/r6rs-benchmarks/boyer.ss b/benchmarks/rnrs-benchmarks/boyer.ss similarity index 99% rename from benchmarks/r6rs-benchmarks/boyer.ss rename to benchmarks/rnrs-benchmarks/boyer.ss index ab1a88c..a3056ca 100644 --- a/benchmarks/r6rs-benchmarks/boyer.ss +++ b/benchmarks/rnrs-benchmarks/boyer.ss @@ -1,11 +1,11 @@ ;;; BOYER -- Logic programming benchmark, originally written by Bob Boyer. ;;; Fairly CONS intensive. -(library (r6rs-benchmarks boyer) +(library (rnrs-benchmarks boyer) (export main) - (import (r6rs) - (r6rs mutable-pairs) - (r6rs-benchmarks)) + (import (rnrs) + (rnrs mutable-pairs) + (rnrs-benchmarks)) (define (lookup key table) (let loop ((x table)) diff --git a/benchmarks/r6rs-benchmarks/browse.ss b/benchmarks/rnrs-benchmarks/browse.ss similarity index 98% rename from benchmarks/r6rs-benchmarks/browse.ss rename to benchmarks/rnrs-benchmarks/browse.ss index b78e1d3..78173cb 100644 --- a/benchmarks/r6rs-benchmarks/browse.ss +++ b/benchmarks/rnrs-benchmarks/browse.ss @@ -1,11 +1,11 @@ ;;; BROWSE -- Benchmark to create and browse through ;;; an AI-like data base of units. -(library (r6rs-benchmarks browse) +(library (rnrs-benchmarks browse) (export main) - (import (r6rs) - (r6rs mutable-pairs) - (r6rs-benchmarks)) + (import (rnrs) + (rnrs mutable-pairs) + (rnrs-benchmarks)) (define (lookup key table) (let loop ((x table)) diff --git a/benchmarks/r6rs-benchmarks/cat.ss b/benchmarks/rnrs-benchmarks/cat.ss similarity index 90% rename from benchmarks/r6rs-benchmarks/cat.ss rename to benchmarks/rnrs-benchmarks/cat.ss index 94ac2e1..0be61fd 100644 --- a/benchmarks/r6rs-benchmarks/cat.ss +++ b/benchmarks/rnrs-benchmarks/cat.ss @@ -1,8 +1,8 @@ ;;; CAT -- One of the Kernighan and Van Wyk benchmarks. -(library (r6rs-benchmarks cat) +(library (rnrs-benchmarks cat) (export main) - (import (r6rs) (r6rs-benchmarks)) + (import (rnrs) (rnrs-benchmarks)) (define inport #f) (define outport #f) diff --git a/benchmarks/r6rs-benchmarks/compiler.ss b/benchmarks/rnrs-benchmarks/compiler.ss similarity index 99% rename from benchmarks/r6rs-benchmarks/compiler.ss rename to benchmarks/rnrs-benchmarks/compiler.ss index 83713eb..3a11348 100644 --- a/benchmarks/r6rs-benchmarks/compiler.ss +++ b/benchmarks/rnrs-benchmarks/compiler.ss @@ -1,8 +1,8 @@ ;(define integer->char ascii->char) ;(define char->integer char->ascii) -(library (r6rs-benchmarks compiler) +(library (rnrs-benchmarks compiler) (export main) - (import (r6rs) (r6rs mutable-pairs) (r6rs-benchmarks)) + (import (rnrs) (rnrs mutable-pairs) (rnrs-benchmarks)) (define open-input-file* open-input-file) (define (pp-expression expr port) (write expr port) (newline port)) diff --git a/benchmarks/r6rs-benchmarks/conform.ss b/benchmarks/rnrs-benchmarks/conform.ss similarity index 99% rename from benchmarks/r6rs-benchmarks/conform.ss rename to benchmarks/rnrs-benchmarks/conform.ss index bd91774..ea2b652 100644 --- a/benchmarks/r6rs-benchmarks/conform.ss +++ b/benchmarks/rnrs-benchmarks/conform.ss @@ -1,11 +1,11 @@ ;;; CONFORM -- Type checker, written by Jim Miller. -(library (r6rs-benchmarks conform) +(library (rnrs-benchmarks conform) (export main) - (import (r6rs) - (r6rs unicode) - (r6rs mutable-pairs) - (r6rs-benchmarks)) + (import (rnrs) + (rnrs unicode) + (rnrs mutable-pairs) + (rnrs-benchmarks)) ;;; Functional and unstable diff --git a/benchmarks/r6rs-benchmarks/cpstak.ss b/benchmarks/rnrs-benchmarks/cpstak.ss similarity index 92% rename from benchmarks/r6rs-benchmarks/cpstak.ss rename to benchmarks/rnrs-benchmarks/cpstak.ss index 35ac91b..0704cf2 100644 --- a/benchmarks/r6rs-benchmarks/cpstak.ss +++ b/benchmarks/rnrs-benchmarks/cpstak.ss @@ -1,9 +1,9 @@ ;;; CPSTAK -- A continuation-passing version of the TAK benchmark. ;;; A good test of first class procedures and tail recursion. -(library (r6rs-benchmarks cpstak) +(library (rnrs-benchmarks cpstak) (export main) - (import (r6rs) (r6rs-benchmarks)) + (import (rnrs) (rnrs-benchmarks)) (define (cpstak x y z) diff --git a/benchmarks/r6rs-benchmarks/ctak.ss b/benchmarks/rnrs-benchmarks/ctak.ss similarity index 92% rename from benchmarks/r6rs-benchmarks/ctak.ss rename to benchmarks/rnrs-benchmarks/ctak.ss index 84a30dd..99c0de1 100644 --- a/benchmarks/r6rs-benchmarks/ctak.ss +++ b/benchmarks/rnrs-benchmarks/ctak.ss @@ -1,8 +1,8 @@ ;;; CTAK -- A version of the TAK procedure that uses continuations. -(library (r6rs-benchmarks ctak) +(library (rnrs-benchmarks ctak) (export main) - (import (r6rs) (r6rs-benchmarks)) + (import (rnrs) (rnrs-benchmarks)) (define (ctak x y z) (call-with-current-continuation diff --git a/benchmarks/r6rs-benchmarks/dderiv.ss b/benchmarks/rnrs-benchmarks/dderiv.ss similarity index 96% rename from benchmarks/r6rs-benchmarks/dderiv.ss rename to benchmarks/rnrs-benchmarks/dderiv.ss index 2d97235..623ee0d 100644 --- a/benchmarks/r6rs-benchmarks/dderiv.ss +++ b/benchmarks/rnrs-benchmarks/dderiv.ss @@ -3,9 +3,9 @@ ;;; Returns the wrong answer for quotients. ;;; Fortunately these aren't used in the benchmark. -(library (r6rs-benchmarks dderiv) +(library (rnrs-benchmarks dderiv) (export main) - (import (r6rs) (r6rs mutable-pairs) (r6rs-benchmarks)) + (import (rnrs) (rnrs mutable-pairs) (rnrs-benchmarks)) (define (lookup key table) (let loop ((x table)) diff --git a/benchmarks/r6rs-benchmarks/deriv.ss b/benchmarks/rnrs-benchmarks/deriv.ss similarity index 95% rename from benchmarks/r6rs-benchmarks/deriv.ss rename to benchmarks/rnrs-benchmarks/deriv.ss index a4cb9fe..211618c 100644 --- a/benchmarks/r6rs-benchmarks/deriv.ss +++ b/benchmarks/rnrs-benchmarks/deriv.ss @@ -1,8 +1,8 @@ ;;; DERIV -- Symbolic derivation. -(library (r6rs-benchmarks deriv) +(library (rnrs-benchmarks deriv) (export main) - (import (r6rs) (r6rs-benchmarks)) + (import (rnrs) (rnrs-benchmarks)) ;;; Returns the wrong answer for quotients. ;;; Fortunately these aren't used in the benchmark. diff --git a/benchmarks/r6rs-benchmarks/destruc.ss b/benchmarks/rnrs-benchmarks/destruc.ss similarity index 95% rename from benchmarks/r6rs-benchmarks/destruc.ss rename to benchmarks/rnrs-benchmarks/destruc.ss index fc91bd8..8f92b97 100644 --- a/benchmarks/r6rs-benchmarks/destruc.ss +++ b/benchmarks/rnrs-benchmarks/destruc.ss @@ -1,10 +1,10 @@ ;;; DESTRUC -- Destructive operation benchmark. -(library (r6rs-benchmarks destruc) +(library (rnrs-benchmarks destruc) (export main) - (import (r6rs) - (r6rs mutable-pairs) - (r6rs-benchmarks)) + (import (rnrs) + (rnrs mutable-pairs) + (rnrs-benchmarks)) (define (append-to-tail! x y) (if (null? x) diff --git a/benchmarks/r6rs-benchmarks/diviter.ss b/benchmarks/rnrs-benchmarks/diviter.ss similarity index 92% rename from benchmarks/r6rs-benchmarks/diviter.ss rename to benchmarks/rnrs-benchmarks/diviter.ss index 7ea57f9..c66caaa 100644 --- a/benchmarks/r6rs-benchmarks/diviter.ss +++ b/benchmarks/rnrs-benchmarks/diviter.ss @@ -1,8 +1,8 @@ ;;; DIVITER -- Benchmark which divides by 2 using lists of n ()'s. -(library (r6rs-benchmarks diviter) +(library (rnrs-benchmarks diviter) (export main) - (import (r6rs) (r6rs-benchmarks)) + (import (rnrs) (rnrs-benchmarks)) (define (create-n n) (do ((n n (- n 1)) diff --git a/benchmarks/r6rs-benchmarks/divrec.ss b/benchmarks/rnrs-benchmarks/divrec.ss similarity index 92% rename from benchmarks/r6rs-benchmarks/divrec.ss rename to benchmarks/rnrs-benchmarks/divrec.ss index 554b0a7..3e4bccb 100644 --- a/benchmarks/r6rs-benchmarks/divrec.ss +++ b/benchmarks/rnrs-benchmarks/divrec.ss @@ -1,8 +1,8 @@ ;;; DIVREC -- Benchmark which divides by 2 using lists of n ()'s. -(library (r6rs-benchmarks divrec) +(library (rnrs-benchmarks divrec) (export main) - (import (r6rs) (r6rs-benchmarks)) + (import (rnrs) (rnrs-benchmarks)) (define (create-n n) (do ((n n (- n 1)) diff --git a/benchmarks/r6rs-benchmarks/dynamic.src.ss b/benchmarks/rnrs-benchmarks/dynamic.src.ss similarity index 99% rename from benchmarks/r6rs-benchmarks/dynamic.src.ss rename to benchmarks/rnrs-benchmarks/dynamic.src.ss index 7bfd0c4..4d2008f 100644 --- a/benchmarks/r6rs-benchmarks/dynamic.src.ss +++ b/benchmarks/rnrs-benchmarks/dynamic.src.ss @@ -2306,7 +2306,7 @@ (define doit (lambda () (i!) - (let ((foo (dynamic-parse-file "r6rs-benchmarks/dynamic.src.ss"))) + (let ((foo (dynamic-parse-file "rnrs-benchmarks/dynamic.src.ss"))) (normalize-global-constraints!) (reset-counters!) (tag-ast*-show foo) diff --git a/benchmarks/rnrs-benchmarks/dynamic.ss b/benchmarks/rnrs-benchmarks/dynamic.ss new file mode 100644 index 0000000..0fdc668 --- /dev/null +++ b/benchmarks/rnrs-benchmarks/dynamic.ss @@ -0,0 +1,5 @@ + +(library (rnrs-benchmarks dynamic) + (export main) + (import (rnrs) (rnrs mutable-pairs) (rnrs-benchmarks)) + (include-source "dynamic.src.ss")) diff --git a/benchmarks/r6rs-benchmarks/earley.ss b/benchmarks/rnrs-benchmarks/earley.ss similarity index 99% rename from benchmarks/r6rs-benchmarks/earley.ss rename to benchmarks/rnrs-benchmarks/earley.ss index 2b6f724..b641560 100644 --- a/benchmarks/r6rs-benchmarks/earley.ss +++ b/benchmarks/rnrs-benchmarks/earley.ss @@ -123,9 +123,9 @@ ; Enders of V = (5 19 20) ; Predictors of V = (15 17) -(library (r6rs-benchmarks earley) +(library (rnrs-benchmarks earley) (export main) - (import (r6rs) (r6rs-benchmarks)) + (import (rnrs) (rnrs-benchmarks)) (define (make-parser grammar lexer) diff --git a/benchmarks/r6rs-benchmarks/fft.ss b/benchmarks/rnrs-benchmarks/fft.ss similarity index 96% rename from benchmarks/r6rs-benchmarks/fft.ss rename to benchmarks/rnrs-benchmarks/fft.ss index bce04c0..ebdcd53 100644 --- a/benchmarks/r6rs-benchmarks/fft.ss +++ b/benchmarks/rnrs-benchmarks/fft.ss @@ -1,8 +1,8 @@ ;;; FFT - Fast Fourier Transform, translated from "Numerical Recipes in C" -(library (r6rs-benchmarks fft) +(library (rnrs-benchmarks fft) (export main) - (import (r6rs) (r6rs arithmetic flonums) (r6rs-benchmarks)) + (import (rnrs) (rnrs arithmetic flonums) (rnrs-benchmarks)) ;(define flsin sin) diff --git a/benchmarks/r6rs-benchmarks/fib.ss b/benchmarks/rnrs-benchmarks/fib.ss similarity index 83% rename from benchmarks/r6rs-benchmarks/fib.ss rename to benchmarks/rnrs-benchmarks/fib.ss index c2fbd26..06b4ea7 100644 --- a/benchmarks/r6rs-benchmarks/fib.ss +++ b/benchmarks/rnrs-benchmarks/fib.ss @@ -1,8 +1,8 @@ ;;; FIB -- A classic benchmark, computes fib(35) inefficiently. -(library (r6rs-benchmarks fib) +(library (rnrs-benchmarks fib) (export main) - (import (r6rs) (r6rs-benchmarks)) + (import (rnrs) (rnrs-benchmarks)) (define (fib n) (if (< n 2) diff --git a/benchmarks/r6rs-benchmarks/fibc.ss b/benchmarks/rnrs-benchmarks/fibc.ss similarity index 91% rename from benchmarks/r6rs-benchmarks/fibc.ss rename to benchmarks/rnrs-benchmarks/fibc.ss index 911d400..5a65990 100644 --- a/benchmarks/r6rs-benchmarks/fibc.ss +++ b/benchmarks/rnrs-benchmarks/fibc.ss @@ -1,8 +1,8 @@ ;;; FIBC -- FIB using first-class continuations, written by Kent Dybvig -(library (r6rs-benchmarks fibc) +(library (rnrs-benchmarks fibc) (export main) - (import (r6rs) (r6rs-benchmarks)) + (import (rnrs) (rnrs-benchmarks)) (define (_1+ n) (+ n 1)) (define (_1- n) (- n 1)) diff --git a/benchmarks/r6rs-benchmarks/fibfp.ss b/benchmarks/rnrs-benchmarks/fibfp.ss similarity index 75% rename from benchmarks/r6rs-benchmarks/fibfp.ss rename to benchmarks/rnrs-benchmarks/fibfp.ss index 95255cc..a8df030 100644 --- a/benchmarks/r6rs-benchmarks/fibfp.ss +++ b/benchmarks/rnrs-benchmarks/fibfp.ss @@ -1,10 +1,10 @@ ;;; FIBFP -- Computes fib(35) using floating point -(library (r6rs-benchmarks fibfp) +(library (rnrs-benchmarks fibfp) (export main) - (import (r6rs) - (r6rs arithmetic flonums) - (r6rs-benchmarks)) + (import (rnrs) + (rnrs arithmetic flonums) + (rnrs-benchmarks)) (define (fibfp n) (if (flvector (vector-length vec) diff --git a/benchmarks/r6rs-benchmarks/lattice.ss b/benchmarks/rnrs-benchmarks/lattice.ss similarity index 98% rename from benchmarks/r6rs-benchmarks/lattice.ss rename to benchmarks/rnrs-benchmarks/lattice.ss index bdf778e..fec231d 100644 --- a/benchmarks/r6rs-benchmarks/lattice.ss +++ b/benchmarks/rnrs-benchmarks/lattice.ss @@ -1,8 +1,8 @@ ;;; LATTICE -- Obtained from Andrew Wright. -(library (r6rs-benchmarks lattice) +(library (rnrs-benchmarks lattice) (export main) - (import (r6rs) (r6rs mutable-pairs) (r6rs-benchmarks)) + (import (rnrs) (rnrs mutable-pairs) (rnrs-benchmarks)) ; Given a comparison routine that returns one of ; less diff --git a/benchmarks/r6rs-benchmarks/matrix.ss b/benchmarks/rnrs-benchmarks/matrix.ss similarity index 99% rename from benchmarks/r6rs-benchmarks/matrix.ss rename to benchmarks/rnrs-benchmarks/matrix.ss index 32e201a..e9f3d50 100644 --- a/benchmarks/r6rs-benchmarks/matrix.ss +++ b/benchmarks/rnrs-benchmarks/matrix.ss @@ -1,8 +1,8 @@ ;;; MATRIX -- Obtained from Andrew Wright. -(library (r6rs-benchmarks matrix) +(library (rnrs-benchmarks matrix) (export main) - (import (r6rs) (r6rs mutable-pairs) (r6rs-benchmarks)) + (import (rnrs) (rnrs mutable-pairs) (rnrs-benchmarks)) ; Chez-Scheme compatibility stuff: (define (chez-box x) (cons x '())) diff --git a/benchmarks/r6rs-benchmarks/maze.ss b/benchmarks/rnrs-benchmarks/maze.ss similarity index 99% rename from benchmarks/r6rs-benchmarks/maze.ss rename to benchmarks/rnrs-benchmarks/maze.ss index 9ab29ed..c562993 100644 --- a/benchmarks/r6rs-benchmarks/maze.ss +++ b/benchmarks/rnrs-benchmarks/maze.ss @@ -10,9 +10,9 @@ ;;; Rehacked by Olin 4/1995. -(library (r6rs-benchmarks maze) +(library (rnrs-benchmarks maze) (export main) - (import (r6rs) (r6rs mutable-pairs) (r6rs-benchmarks)) + (import (rnrs) (rnrs mutable-pairs) (rnrs-benchmarks)) (define (random-state n) (cons n #f)) diff --git a/benchmarks/r6rs-benchmarks/mazefun.ss b/benchmarks/rnrs-benchmarks/mazefun.ss similarity index 98% rename from benchmarks/r6rs-benchmarks/mazefun.ss rename to benchmarks/rnrs-benchmarks/mazefun.ss index 2a9c2d7..5cf56ce 100644 --- a/benchmarks/r6rs-benchmarks/mazefun.ss +++ b/benchmarks/rnrs-benchmarks/mazefun.ss @@ -1,9 +1,9 @@ ;;; MAZEFUN -- Constructs a maze in a purely functional way, ;;; written by Marc Feeley. -(library (r6rs-benchmarks mazefun) +(library (rnrs-benchmarks mazefun) (export main) - (import (r6rs) (r6rs-benchmarks)) + (import (rnrs) (rnrs-benchmarks)) (define foldr (lambda (f base lst) diff --git a/benchmarks/r6rs-benchmarks/mbrot.ss b/benchmarks/rnrs-benchmarks/mbrot.ss similarity index 93% rename from benchmarks/r6rs-benchmarks/mbrot.ss rename to benchmarks/rnrs-benchmarks/mbrot.ss index 761354b..576c422 100644 --- a/benchmarks/r6rs-benchmarks/mbrot.ss +++ b/benchmarks/rnrs-benchmarks/mbrot.ss @@ -1,8 +1,8 @@ ;;; MBROT -- Generation of Mandelbrot set fractal. -(library (r6rs-benchmarks mbrot) +(library (rnrs-benchmarks mbrot) (export main) - (import (r6rs) (r6rs arithmetic flonums) (r6rs-benchmarks)) + (import (rnrs) (rnrs arithmetic flonums) (rnrs-benchmarks)) (define (count r i step x y) diff --git a/benchmarks/r6rs-benchmarks/nbody.ss b/benchmarks/rnrs-benchmarks/nbody.ss similarity index 99% rename from benchmarks/r6rs-benchmarks/nbody.ss rename to benchmarks/rnrs-benchmarks/nbody.ss index 39d828b..1023a41 100644 --- a/benchmarks/r6rs-benchmarks/nbody.ss +++ b/benchmarks/rnrs-benchmarks/nbody.ss @@ -4,13 +4,13 @@ ; and added nbody-benchmark. ; 981116 / wdc Replaced nbody-benchmark by main, added apply:+. -(library (r6rs-benchmarks nbody) +(library (rnrs-benchmarks nbody) (export main) (import - (r6rs) - (r6rs arithmetic flonums) - (r6rs mutable-pairs) - (r6rs-benchmarks)) + (rnrs) + (rnrs arithmetic flonums) + (rnrs mutable-pairs) + (rnrs-benchmarks)) (define void (let ((invisible (string->symbol ""))) diff --git a/benchmarks/r6rs-benchmarks/nboyer.ss b/benchmarks/rnrs-benchmarks/nboyer.ss similarity index 99% rename from benchmarks/r6rs-benchmarks/nboyer.ss rename to benchmarks/rnrs-benchmarks/nboyer.ss index 13f224d..f4ece2f 100644 --- a/benchmarks/r6rs-benchmarks/nboyer.ss +++ b/benchmarks/rnrs-benchmarks/nboyer.ss @@ -54,9 +54,9 @@ ; The second phase creates the test problem, and tests to see ; whether it is implied by the lemmas. -(library (r6rs-benchmarks nboyer) +(library (rnrs-benchmarks nboyer) (export main) - (import (r6rs) (r6rs-benchmarks)) + (import (rnrs) (rnrs-benchmarks)) (define (main . args) (let ((n (if (null? args) 0 (car args)))) diff --git a/benchmarks/r6rs-benchmarks/nqueens.ss b/benchmarks/rnrs-benchmarks/nqueens.ss similarity index 93% rename from benchmarks/r6rs-benchmarks/nqueens.ss rename to benchmarks/rnrs-benchmarks/nqueens.ss index 2c65242..66f434d 100644 --- a/benchmarks/r6rs-benchmarks/nqueens.ss +++ b/benchmarks/rnrs-benchmarks/nqueens.ss @@ -1,8 +1,8 @@ ;;; NQUEENS -- Compute number of solutions to 8-queens problem. -(library (r6rs-benchmarks nqueens) +(library (rnrs-benchmarks nqueens) (export main) - (import (r6rs) (r6rs-benchmarks)) + (import (rnrs) (rnrs-benchmarks)) (define trace? #f) diff --git a/benchmarks/r6rs-benchmarks/ntakl.ss b/benchmarks/rnrs-benchmarks/ntakl.ss similarity index 94% rename from benchmarks/r6rs-benchmarks/ntakl.ss rename to benchmarks/rnrs-benchmarks/ntakl.ss index 20d5d46..c8b4111 100644 --- a/benchmarks/r6rs-benchmarks/ntakl.ss +++ b/benchmarks/rnrs-benchmarks/ntakl.ss @@ -1,9 +1,9 @@ ;;; NTAKL -- The TAKeuchi function using lists as counters, ;;; with an alternative boolean expression. -(library (r6rs-benchmarks ntakl) +(library (rnrs-benchmarks ntakl) (export main) - (import (r6rs) (r6rs-benchmarks)) + (import (rnrs) (rnrs-benchmarks)) (define (listn n) (if (= n 0) diff --git a/benchmarks/r6rs-benchmarks/nucleic.ss b/benchmarks/rnrs-benchmarks/nucleic.ss similarity index 99% rename from benchmarks/r6rs-benchmarks/nucleic.ss rename to benchmarks/rnrs-benchmarks/nucleic.ss index 4966768..0e39fb7 100644 --- a/benchmarks/r6rs-benchmarks/nucleic.ss +++ b/benchmarks/rnrs-benchmarks/nucleic.ss @@ -18,12 +18,12 @@ ; -- MATH UTILITIES ----------------------------------------------------------- -(library (r6rs-benchmarks nucleic) +(library (rnrs-benchmarks nucleic) (export main) - (import (r6rs) (r6rs arithmetic flonums) (r6rs-benchmarks)) - (define FLOATatan atan) - (define FLOATcos cos) - (define FLOATsin sin) + (import (rnrs) (rnrs arithmetic flonums) (rnrs-benchmarks)) + (define FLOATatan flatan) + (define FLOATcos flcos) + (define FLOATsin flsin) (define-syntax nuc-const (syntax-rules () [(_ x* ...) '#(x* ...)])) diff --git a/benchmarks/r6rs-benchmarks/paraffins.ss b/benchmarks/rnrs-benchmarks/paraffins.ss similarity index 98% rename from benchmarks/r6rs-benchmarks/paraffins.ss rename to benchmarks/rnrs-benchmarks/paraffins.ss index 1107c69..25decec 100644 --- a/benchmarks/r6rs-benchmarks/paraffins.ss +++ b/benchmarks/rnrs-benchmarks/paraffins.ss @@ -1,8 +1,8 @@ ;;; PARAFFINS -- Compute how many paraffins exist with N carbon atoms. -(library (r6rs-benchmarks paraffins) +(library (rnrs-benchmarks paraffins) (export main) - (import (r6rs) (r6rs-benchmarks)) + (import (rnrs) (rnrs-benchmarks)) (define (gen n) (let* ((n/2 (quotient n 2)) diff --git a/benchmarks/r6rs-benchmarks/parsing.ss b/benchmarks/rnrs-benchmarks/parsing.ss similarity index 99% rename from benchmarks/r6rs-benchmarks/parsing.ss rename to benchmarks/rnrs-benchmarks/parsing.ss index 449a574..6f4def7 100644 --- a/benchmarks/r6rs-benchmarks/parsing.ss +++ b/benchmarks/rnrs-benchmarks/parsing.ss @@ -20,9 +20,9 @@ ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -(library (r6rs-benchmarks parsing) +(library (rnrs-benchmarks parsing) (export main) - (import (r6rs) (r6rs-benchmarks)) + (import (rnrs) (rnrs-benchmarks)) (define (parsing-benchmark . rest) (let* ((n (if (null? rest) 1000 (car rest))) diff --git a/benchmarks/r6rs-benchmarks/perm9.ss b/benchmarks/rnrs-benchmarks/perm9.ss similarity index 98% rename from benchmarks/r6rs-benchmarks/perm9.ss rename to benchmarks/rnrs-benchmarks/perm9.ss index bd667d3..a97cf83 100644 --- a/benchmarks/r6rs-benchmarks/perm9.ss +++ b/benchmarks/rnrs-benchmarks/perm9.ss @@ -33,9 +33,9 @@ ; To: will ; Subject: Pancake flips -(library (r6rs-benchmarks perm9) +(library (rnrs-benchmarks perm9) (export main) - (import (r6rs) (r6rs-benchmarks)) + (import (rnrs) (rnrs-benchmarks)) ; Procedure P_n generates a grey code of all perms of n elements ; on top of stack ending with reversal of starting sequence diff --git a/benchmarks/r6rs-benchmarks/peval.ss b/benchmarks/rnrs-benchmarks/peval.ss similarity index 99% rename from benchmarks/r6rs-benchmarks/peval.ss rename to benchmarks/rnrs-benchmarks/peval.ss index 0e3caf6..6d278c4 100644 --- a/benchmarks/r6rs-benchmarks/peval.ss +++ b/benchmarks/rnrs-benchmarks/peval.ss @@ -1,8 +1,8 @@ ;;; PEVAL -- A simple partial evaluator for Scheme, written by Marc Feeley. -(library (r6rs-benchmarks peval) +(library (rnrs-benchmarks peval) (export main) - (import (r6rs) (r6rs mutable-pairs) (r6rs-benchmarks)) + (import (rnrs) (rnrs mutable-pairs) (rnrs-benchmarks)) ;------------------------------------------------------------------------------ diff --git a/benchmarks/r6rs-benchmarks/pi.ss b/benchmarks/rnrs-benchmarks/pi.ss similarity index 99% rename from benchmarks/r6rs-benchmarks/pi.ss rename to benchmarks/rnrs-benchmarks/pi.ss index 9e832de..c512a5f 100644 --- a/benchmarks/r6rs-benchmarks/pi.ss +++ b/benchmarks/rnrs-benchmarks/pi.ss @@ -2,9 +2,9 @@ ; See http://mathworld.wolfram.com/Pi.html for the various algorithms. -(library (r6rs-benchmarks pi) +(library (rnrs-benchmarks pi) (export main) - (import (r6rs) (r6rs-benchmarks)) + (import (rnrs) (rnrs-benchmarks)) ; Utilities. diff --git a/benchmarks/r6rs-benchmarks/pnpoly.ss b/benchmarks/rnrs-benchmarks/pnpoly.ss similarity index 95% rename from benchmarks/r6rs-benchmarks/pnpoly.ss rename to benchmarks/rnrs-benchmarks/pnpoly.ss index ed18445..09bb4cd 100644 --- a/benchmarks/r6rs-benchmarks/pnpoly.ss +++ b/benchmarks/rnrs-benchmarks/pnpoly.ss @@ -1,8 +1,8 @@ ;;; PNPOLY - Test if a point is contained in a 2D polygon. -(library (r6rs-benchmarks pnpoly) +(library (rnrs-benchmarks pnpoly) (export main) - (import (r6rs) (r6rs arithmetic flonums) (r6rs-benchmarks)) + (import (rnrs) (rnrs arithmetic flonums) (rnrs-benchmarks)) (define (pt-in-poly2 xp yp x y) (let loop ((c #f) (i (- (vector-length xp) 1)) (j 0)) diff --git a/benchmarks/r6rs-benchmarks/primes.ss b/benchmarks/rnrs-benchmarks/primes.ss similarity index 93% rename from benchmarks/r6rs-benchmarks/primes.ss rename to benchmarks/rnrs-benchmarks/primes.ss index 06b595e..4808d9c 100644 --- a/benchmarks/r6rs-benchmarks/primes.ss +++ b/benchmarks/rnrs-benchmarks/primes.ss @@ -1,8 +1,8 @@ ;;; PRIMES -- Compute primes less than 100, written by Eric Mohr. -(library (r6rs-benchmarks primes) +(library (rnrs-benchmarks primes) (export main) - (import (r6rs) (r6rs-benchmarks)) + (import (rnrs) (rnrs-benchmarks)) (define (interval-list m n) (if (> m n) diff --git a/benchmarks/r6rs-benchmarks/puzzle.ss b/benchmarks/rnrs-benchmarks/puzzle.ss similarity index 98% rename from benchmarks/r6rs-benchmarks/puzzle.ss rename to benchmarks/rnrs-benchmarks/puzzle.ss index 9361982..70fd37c 100644 --- a/benchmarks/r6rs-benchmarks/puzzle.ss +++ b/benchmarks/rnrs-benchmarks/puzzle.ss @@ -1,8 +1,8 @@ ;;; PUZZLE -- Forest Baskett's Puzzle benchmark, originally written in Pascal. -(library (r6rs-benchmarks puzzle) +(library (rnrs-benchmarks puzzle) (export main) - (import (r6rs) (r6rs-benchmarks)) + (import (rnrs) (rnrs-benchmarks)) (define (my-iota n) (do ((n n (- n 1)) diff --git a/benchmarks/r6rs-benchmarks/quicksort.ss b/benchmarks/rnrs-benchmarks/quicksort.ss similarity index 96% rename from benchmarks/r6rs-benchmarks/quicksort.ss rename to benchmarks/rnrs-benchmarks/quicksort.ss index 58c5b3e..be1cbd4 100644 --- a/benchmarks/r6rs-benchmarks/quicksort.ss +++ b/benchmarks/rnrs-benchmarks/quicksort.ss @@ -1,9 +1,9 @@ ; The quick-1 benchmark. (Figure 35, page 132.) -(library (r6rs-benchmarks quicksort) +(library (rnrs-benchmarks quicksort) (export main) - (import (r6rs) (r6rs mutable-pairs) (r6rs-benchmarks)) + (import (rnrs) (rnrs mutable-pairs) (rnrs-benchmarks)) (define (quick-1 v less?) diff --git a/benchmarks/r6rs-benchmarks/ray.ss b/benchmarks/rnrs-benchmarks/ray.ss similarity index 98% rename from benchmarks/r6rs-benchmarks/ray.ss rename to benchmarks/rnrs-benchmarks/ray.ss index fa3c370..86d6e41 100644 --- a/benchmarks/r6rs-benchmarks/ray.ss +++ b/benchmarks/rnrs-benchmarks/ray.ss @@ -1,9 +1,9 @@ ;;; RAY -- Ray-trace a simple scene with spheres, generating a ".pgm" file. ;;; Translated to Scheme from Paul Graham's book ANSI Common Lisp, Example 9.8 -(library (r6rs-benchmarks ray) +(library (rnrs-benchmarks ray) (export main) - (import (r6rs) (r6rs arithmetic flonums) (r6rs-benchmarks)) + (import (rnrs) (rnrs arithmetic flonums) (rnrs-benchmarks)) (define (make-point x y z) (vector x y z)) diff --git a/benchmarks/r6rs-benchmarks/sboyer.ss b/benchmarks/rnrs-benchmarks/sboyer.ss similarity index 99% rename from benchmarks/r6rs-benchmarks/sboyer.ss rename to benchmarks/rnrs-benchmarks/sboyer.ss index 0c739a6..7b97628 100644 --- a/benchmarks/r6rs-benchmarks/sboyer.ss +++ b/benchmarks/rnrs-benchmarks/sboyer.ss @@ -55,9 +55,9 @@ ; The second phase creates the test problem, and tests to see ; whether it is implied by the lemmas. -(library (r6rs-benchmarks sboyer) +(library (rnrs-benchmarks sboyer) (export main) - (import (r6rs) (r6rs-benchmarks)) + (import (rnrs) (rnrs-benchmarks)) (define (main . args) (let ((n (if (null? args) 0 (car args)))) diff --git a/benchmarks/r6rs-benchmarks/scheme.ss b/benchmarks/rnrs-benchmarks/scheme.ss similarity index 99% rename from benchmarks/r6rs-benchmarks/scheme.ss rename to benchmarks/rnrs-benchmarks/scheme.ss index 20b23f1..445e597 100644 --- a/benchmarks/r6rs-benchmarks/scheme.ss +++ b/benchmarks/rnrs-benchmarks/scheme.ss @@ -2,9 +2,9 @@ ; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -(library (r6rs-benchmarks scheme) +(library (rnrs-benchmarks scheme) (export main) - (import (r6rs) (r6rs mutable-pairs) (r6rs-benchmarks)) + (import (rnrs) (rnrs mutable-pairs) (rnrs-benchmarks)) (define (scheme-eval expr) (let ((code (scheme-comp expr scheme-global-environment))) @@ -860,6 +860,46 @@ (scheme-global-var name) value)) + + (define (main . args) + (run-benchmark + "scheme" + scheme-iters + (lambda (result) + (equal? result + '("eight" "eleven" "five" "four" "nine" "one" + "seven" "six" "ten" "three" "twelve" "two"))) + (lambda (expr) (lambda () (scheme-eval expr))) + '(let () + + (define (sort-list obj pred) + + (define (loop l) + (if (and (pair? l) (pair? (cdr l))) + (split l '() '()) + l)) + + (define (split l one two) + (if (pair? l) + (split (cdr l) two (cons (car l) one)) + (merge (loop one) (loop two)))) + + (define (merge one two) + (cond ((null? one) two) + ((pred (car two) (car one)) + (cons (car two) + (merge (cdr two) one))) + (else + (cons (car one) + (merge (cdr one) two))))) + + (loop obj)) + + (sort-list '("one" "two" "three" "four" "five" "six" + "seven" "eight" "nine" "ten" "eleven" "twelve") + stringvector '(1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1))) diff --git a/benchmarks/r6rs-benchmarks/wc.ss b/benchmarks/rnrs-benchmarks/wc.ss similarity index 94% rename from benchmarks/r6rs-benchmarks/wc.ss rename to benchmarks/rnrs-benchmarks/wc.ss index 9bcc156..f08156b 100644 --- a/benchmarks/r6rs-benchmarks/wc.ss +++ b/benchmarks/rnrs-benchmarks/wc.ss @@ -1,8 +1,8 @@ ;;; WC -- One of the Kernighan and Van Wyk benchmarks. -(library (r6rs-benchmarks wc) +(library (rnrs-benchmarks wc) (export main) - (import (r6rs) (r6rs-benchmarks)) + (import (rnrs) (rnrs-benchmarks)) (define inport #f)