From 66ab8b6416152e65f39f4355385cfea595b9e5a9 Mon Sep 17 00:00:00 2001 From: Justin Ethier Date: Sat, 26 Aug 2017 17:56:33 -0400 Subject: [PATCH] Adding temporary test files --- opt-test.data | 3 +++ opt-test.scm | 18 ++++++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 opt-test.data create mode 100644 opt-test.scm diff --git a/opt-test.data b/opt-test.data new file mode 100644 index 00000000..01e79c32 --- /dev/null +++ b/opt-test.data @@ -0,0 +1,3 @@ +1 +2 +3 diff --git a/opt-test.scm b/opt-test.scm new file mode 100644 index 00000000..26b51b80 --- /dev/null +++ b/opt-test.scm @@ -0,0 +1,18 @@ +;; Testing optimizations +;; +;; Timings: T430 +;; Baseline - 2.511 +;; +(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))