home *** CD-ROM | disk | FTP | other *** search
Text File | 1992-12-28 | 873 b | 40 lines | [TEXT/Help] |
- {••••••••••••••••••••••• Some Gabriel Benchmarks •••••••••••••••••••••••}
-
- {••• tak •••}
-
- (define (tak x y z)
- (cond (not (<? y x))
- z
- (tak (tak (1- x) y z)
- (tak (1- y) z x)
- (tak (1- z) x y))))
-
- {••• Timing IIci •••}
- (chrono (tak 18 12 6))
- { = [7 2.243333333333333333e+1 1.333333333333333333e+0] }
-
- {••• Timing IIci, strictness info added •••}
- (setstrict tak %111)
- (chrono (tak 18 12 6))
- { = [7 1.890000000000000000e+1 5.166666666666666666e-1] }
-
- {••• Another one, so good for lazyness !!! •••}
-
- (define (rd2 l)
- (cond (null? l) ()
- (cons (0 l)(rd2 (-2 l)))))
-
- (define (t n)
- (cond (zero? n) ()
- (begin (rd2 ll)(rd2 ll)(rd2 ll)(rd2 ll)(t (1- n)))))
-
- (define (c n)
- (cond (zero? n) ()
- (cons () (c (1- n)))))
-
- (define ll (c 200))
-
- {••• try it, faster than a CRAY: lazyness -> does nothing •••}
- (chrono (t 300))
-
-