From 096498e222f435ee661abe9dbc5b68155c9c5eb0 Mon Sep 17 00:00:00 2001 From: Teresa Amor Date: Wed, 14 Apr 2021 23:11:25 +0000 Subject: [PATCH] benchmarks --- benchmarks/constant_prop.lisp | 13 +++++++++++++ benchmarks/constant_prop.out | 1 + benchmarks/constant_prop_let.lisp | 8 ++++++++ benchmarks/constant_prop_let.out | 1 + benchmarks/inlining.lisp | 4 ++++ benchmarks/inlining.out | 1 + 6 files changed, 28 insertions(+) create mode 100644 benchmarks/constant_prop.lisp create mode 100644 benchmarks/constant_prop.out create mode 100644 benchmarks/constant_prop_let.lisp create mode 100644 benchmarks/constant_prop_let.out create mode 100644 benchmarks/inlining.lisp create mode 100644 benchmarks/inlining.out diff --git a/benchmarks/constant_prop.lisp b/benchmarks/constant_prop.lisp new file mode 100644 index 0000000..b7c421d --- /dev/null +++ b/benchmarks/constant_prop.lisp @@ -0,0 +1,13 @@ +(if (< 1 2) + (if (< 2 3) + (if (< 3 4) + (if (< 4 5) + (let ((x 2)) + (let ((y 1)) + (print (add1 (sub1 (add1 (add1 (add1 (+ 4 (+ 5 (+ 6 (+ 7 (+ x (+ y (+ x (- y (- 10 x))))))))))))))) + ) + ) + 0) + 0) + 0) +0) \ No newline at end of file diff --git a/benchmarks/constant_prop.out b/benchmarks/constant_prop.out new file mode 100644 index 0000000..b393560 --- /dev/null +++ b/benchmarks/constant_prop.out @@ -0,0 +1 @@ +23 \ No newline at end of file diff --git a/benchmarks/constant_prop_let.lisp b/benchmarks/constant_prop_let.lisp new file mode 100644 index 0000000..5b95781 --- /dev/null +++ b/benchmarks/constant_prop_let.lisp @@ -0,0 +1,8 @@ +(let ((a 1)) + (let ((b 2)) + (let ((c 3)) + (let ((d 4)) + (if (+ a (+ b (+ c (+ d d)))) + (print (+ a (+ b (+ c (+ d d))))) + (print (+ a (+ b (+ c (+ d d))))) + ))))) \ No newline at end of file diff --git a/benchmarks/constant_prop_let.out b/benchmarks/constant_prop_let.out new file mode 100644 index 0000000..da2d398 --- /dev/null +++ b/benchmarks/constant_prop_let.out @@ -0,0 +1 @@ +14 \ No newline at end of file diff --git a/benchmarks/inlining.lisp b/benchmarks/inlining.lisp new file mode 100644 index 0000000..aaf16fd --- /dev/null +++ b/benchmarks/inlining.lisp @@ -0,0 +1,4 @@ +(define (double x) (+ x x)) +(let ((x 3)) + (print (+ (double x) (+ (double x) (+ (double x) (+ (double x) (double 2)))))) +) \ No newline at end of file diff --git a/benchmarks/inlining.out b/benchmarks/inlining.out new file mode 100644 index 0000000..368f89c --- /dev/null +++ b/benchmarks/inlining.out @@ -0,0 +1 @@ +28 \ No newline at end of file