Created
July 12, 2016 09:04
-
-
Save hyotang666/b4385eaa724a4a527a9fdbbd8dbb4f9d to your computer and use it in GitHub Desktop.
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
(declaim(ftype(function((mod #.most-positive-fixnum))(mod #.most-positive-fixnum))fib)) | |
(eval-when(:execute :load-toplevel :compile-toplevel) | |
(defun fib (n) | |
(declare(optimize (speed 3)(safety 0))) | |
(if (< n 2) | |
n | |
(+ (fib (- n 2)) | |
(fib (- n 1))))) | |
) | |
(time(print #.(fib 38))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment