From 74619e25ed462c6664e46cdf2b8ff9f184d829c9 Mon Sep 17 00:00:00 2001 From: Timothy Fong Date: Mon, 2 Dec 2024 20:58:08 +0000 Subject: [PATCH 1/2] add benchmarks --- benchmarks/constant-inlining.lisp | 6 ++++++ benchmarks/constant-prop.lisp | 7 +++++++ benchmarks/inlining.lisp | 8 ++++++++ 3 files changed, 21 insertions(+) create mode 100644 benchmarks/constant-inlining.lisp create mode 100644 benchmarks/constant-prop.lisp create mode 100644 benchmarks/inlining.lisp diff --git a/benchmarks/constant-inlining.lisp b/benchmarks/constant-inlining.lisp new file mode 100644 index 0000000..7f6bca5 --- /dev/null +++ b/benchmarks/constant-inlining.lisp @@ -0,0 +1,6 @@ +(define (g y) + (- y (+ y (- y (+ 5 (+ y (+ y (- y y)))))))) + +(print + (let ((y 8)) + (g (g y)))) diff --git a/benchmarks/constant-prop.lisp b/benchmarks/constant-prop.lisp new file mode 100644 index 0000000..26f4f64 --- /dev/null +++ b/benchmarks/constant-prop.lisp @@ -0,0 +1,7 @@ +(let ((a 7)) + (let ((b 12)) + (let ((c 9)) + (print (+ a (- b (+ c (- 8 (+ b (- a (- c (+ b (- a (+ c 15)))))))))) + ) + ) +)) diff --git a/benchmarks/inlining.lisp b/benchmarks/inlining.lisp new file mode 100644 index 0000000..65a95b9 --- /dev/null +++ b/benchmarks/inlining.lisp @@ -0,0 +1,8 @@ +(define (f1 x) (+ x 5)) +(define (f2 x) (* (f1 x) 2)) +(define (f3 x) (- (f2 x) (f1 x))) +(define (f4 x) (/ (f3 x) 3)) + +(print + (let ((x 10)) + (f4 (f3 (f2 (f1 x)))))) From 78c5666d2e7d09e5783521a906dfe98a58f9d479 Mon Sep 17 00:00:00 2001 From: Rob Lewis Date: Tue, 3 Dec 2024 11:12:47 -0500 Subject: [PATCH 2/2] Rename inlining.lisp to inlining-timfon.lisp name conflict --- benchmarks/{inlining.lisp => inlining-timfon.lisp} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename benchmarks/{inlining.lisp => inlining-timfon.lisp} (100%) diff --git a/benchmarks/inlining.lisp b/benchmarks/inlining-timfon.lisp similarity index 100% rename from benchmarks/inlining.lisp rename to benchmarks/inlining-timfon.lisp