mirror of
https://github.com/justinethier/cyclone.git
synced 2025-05-18 21:29:18 +02:00
WIP
This commit is contained in:
parent
7b2a4991a7
commit
8c6c27b3d6
2 changed files with 33 additions and 4 deletions
|
@ -1,6 +1,6 @@
|
|||
;;; CTAK -- A version of the TAK procedure that uses continuations.
|
||||
|
||||
(import (scheme base) (scheme read) (scheme write) (scheme time))
|
||||
(import (scheme base) (scheme read) (scheme write) (scheme time) (srfi 18))
|
||||
|
||||
(define (ctak x y z)
|
||||
(call-with-current-continuation
|
||||
|
@ -35,7 +35,26 @@
|
|||
(string-append name ":" s1 ":" s2 ":" s3 ":" s4)
|
||||
count
|
||||
(lambda ()
|
||||
(ctak (hide count input1) (hide count input2) (hide count input3)))
|
||||
(thread-start!
|
||||
(make-thread
|
||||
(lambda ()
|
||||
(ctak (hide count input1) (hide count input2) (hide count input3)))))
|
||||
(thread-start!
|
||||
(make-thread
|
||||
(lambda ()
|
||||
(ctak (hide count input1) (hide count input2) (hide count input3)))))
|
||||
(thread-start!
|
||||
(make-thread
|
||||
(lambda ()
|
||||
(ctak (hide count input1) (hide count input2) (hide count input3)))))
|
||||
(thread-start!
|
||||
(make-thread
|
||||
(lambda ()
|
||||
(ctak (hide count input1) (hide count input2) (hide count input3)))))
|
||||
(ctak (hide count input1) (hide count input2) (hide count input3))
|
||||
|
||||
;; TODO: thread-join
|
||||
)
|
||||
(lambda (result) (equal? result output)))))
|
||||
|
||||
;;; The following code is appended to all benchmarks.
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
;;; PARAFFINS -- Compute how many paraffins exist with N carbon atoms.
|
||||
|
||||
(import (scheme base) (scheme read) (scheme write) (scheme time))
|
||||
(import (scheme base) (scheme read) (scheme write) (scheme time) (srfi 18))
|
||||
|
||||
;;; This benchmark uses the following R6RS procedures.
|
||||
|
||||
|
@ -186,7 +186,17 @@
|
|||
(run-r7rs-benchmark
|
||||
(string-append name ":" s1 ":" s2)
|
||||
count
|
||||
(lambda () (nb (hide count input1)))
|
||||
(lambda ()
|
||||
#;(thread-start!
|
||||
(make-thread
|
||||
(lambda ()
|
||||
(nb (hide count input1)))))
|
||||
(thread-start!
|
||||
(make-thread
|
||||
(lambda ()
|
||||
(nb (hide count input1)))))
|
||||
(nb (hide count input1))
|
||||
)
|
||||
(lambda (result) (= result output)))))
|
||||
|
||||
;;; The following code is appended to all benchmarks.
|
||||
|
|
Loading…
Add table
Reference in a new issue