mirror of
https://github.com/justinethier/cyclone.git
synced 2025-07-14 00:07:36 +02:00
Removing old files
This commit is contained in:
parent
79e9b83652
commit
7a3db33e8f
2 changed files with 0 additions and 48 deletions
|
@ -1,3 +0,0 @@
|
|||
1
|
||||
2
|
||||
3
|
45
opt-test.scm
45
opt-test.scm
|
@ -1,45 +0,0 @@
|
|||
;; Testing the next set of optimizations
|
||||
;; To run: ./opt-test < opt-test.data
|
||||
;;
|
||||
;; Timings: T430
|
||||
;; Baseline - 2.511
|
||||
;; Dyadic - 1.409
|
||||
;;
|
||||
(import (scheme base)
|
||||
(scheme write)
|
||||
(scheme read))
|
||||
(let ((x (read))
|
||||
(y (read))
|
||||
(z (read))
|
||||
(iterations 10000000)
|
||||
(sum 0))
|
||||
(do ((i iterations (- i 1)))
|
||||
((zero? i))
|
||||
(set! sum (+ sum sum (* x y z)))
|
||||
(set! sum (- sum sum (* x y z))))
|
||||
(write sum))
|
||||
|
||||
;;; Take an expression containing a single function call and break it up
|
||||
;;; into many calls of 2 arguments each.
|
||||
;(define (->dyadic expr)
|
||||
; (cond
|
||||
; ((< (length expr) 4)
|
||||
; expr)
|
||||
; (else
|
||||
; (let ((fnc (car expr)))
|
||||
; (foldl
|
||||
; (lambda (x acc)
|
||||
; (list fnc acc x))
|
||||
; `(,fnc ,(cadr expr) ,(caddr expr))
|
||||
; (cdddr expr))))))
|
||||
;
|
||||
;(write (->dyadic '(+ 1)))
|
||||
;(write (->dyadic '(+ 1 2)))
|
||||
;(write (->dyadic '(+ 1 2 3)))
|
||||
;(write (->dyadic '(+ 1 2 3 4)))
|
||||
;;(write
|
||||
;; (foldl
|
||||
;; (lambda (x acc)
|
||||
;; (list 'Cyc-fast-plus acc x))
|
||||
;; '(Cyc-fast-plus 1 2)
|
||||
;; '(3 4 5)))
|
Loading…
Add table
Reference in a new issue