Skip to content

Commit

Permalink
Merge pull request #7 from alanchen-1/main
Browse files Browse the repository at this point in the history
[achen258] add benchmarks
  • Loading branch information
robertylewis authored Dec 3, 2024
2 parents 761e3c3 + 0fca39e commit c70d7e9
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 10 deletions.
11 changes: 11 additions & 0 deletions benchmarks/heuristics.lisp
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
(define (g x y a b) (< (+ x y) (- a b)))
(define (f x) (+ x 3))
(print (let ((z (f 4))) (
pair (g 1 2 3 4) (
pair (g 1 2 3 4) (
pair (g 1 2 3 4) (
pair (g 1 2 3 4) (
pair (g 1 2 3 4) (
pair (g 1 2 3 4) (
pair (g 1 2 3 4) ()
)))))))))
5 changes: 5 additions & 0 deletions benchmarks/new_leaf.lisp
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
(define (g x y) (+ (f x) (f y)))
(define (f x) (+ x 3))
(print (let ((z -1)) (
if (= (g z z) 4) (+ z 3) (+ z (- (+ 1 3) 5))
)))
4 changes: 4 additions & 0 deletions benchmarks/prop_constants_simple.lisp
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
(define (f x) (+ x 3))
(print (let ((z -1)) (
if (= (f z) 2) (+ z 3) (+ z (- (+ 1 3) 5))
)))
12 changes: 2 additions & 10 deletions config.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,11 @@
{
"No optimizations": [],
"Inlining": [
"uniquify-variables",
"inline"
"Constant Propagation": [
"propagate-constants"
],
"Constant propagation and inlining": [
"uniquify-variables",
"inline",
"propagate-constants"
],
"All optimizations": [
"uniquify-variables",
"inline",
"propagate-constants",
"eliminate-common-subexpressions",
"peephole"
]
}

0 comments on commit c70d7e9

Please sign in to comment.