-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
178 additions
and
98 deletions.
There are no files selected for viewing
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
|
||
;; Turn off our memoization feature so we get a fair "raw" recursion test against RustHE | ||
;; however our interpeter TCO's EVERYTHING so we are in this case 10M+ times faster than RustHE | ||
;; !(pragma! tabling false) | ||
;; makes this file be treated as if the command line --compile=full was supplied | ||
!(pragma! compile full) | ||
|
||
(= (fib $n) | ||
(if (== $n 0) | ||
0 | ||
(if (== $n 1) | ||
1 | ||
(+ (fib (- $n 1)) (fib (- $n 2)))))) | ||
|
||
!(println! (fib 444444)) | ||
|
||
; Execution took 63.44 seconds. | ||
|
||
|
||
|
||
|
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
|
||
;; makes this file be treated as if the command line --compile=full was supplied | ||
!(pragma! compile full) | ||
|
||
(= (fib $n) | ||
(if (== $n 0) | ||
0 | ||
(if (== $n 1) | ||
1 | ||
(+ (fib (- $n 1)) (fib (- $n 2)))))) | ||
|
||
|
||
!(call-fn (argv-metta 1)) | ||
!(println! (fib (call-fn (argv-metta 1)))) | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.