Skip to content

Commit

Permalink
Add Takeuchi func for microbenchmarking.
Browse files Browse the repository at this point in the history
  • Loading branch information
tadd committed Feb 1, 2025
1 parent 05f36e0 commit 6bef298
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
schaf
basic-test
*-san
/microbench/*.scm
/microbench/symbols.scm
10 changes: 10 additions & 0 deletions microbench/tarai.scm
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
(define tarai
(lambda (x y z)
(if (<= x y)
y
(tarai
(tarai (- x 1) y z)
(tarai (- y 1) z x)
(tarai (- z 1) x y)))))

(tarai 9 8 0)

0 comments on commit 6bef298

Please sign in to comment.