On Fri, Jul 22, 2011 at 11:02 PM, Oskar <oskar.kv...@gmail.com> wrote:
> Thanks for the replies everyone!
>
> About the Python version not being recursive: Oh yeah, didn't even
> think about that, but it shouldn't matter that much, or? With all the
> right type hints the clojure version should be much faster than the
> previous one even with recursion, right?

How many times does the recursive version recalculate, say, (sk 1)? It
calculates (sk 1). Later it reaches (sk 56) which calculates (sk 1)
again. Then (sk 80) recalculates (sk 56) which recalculates (sk 1),
and (sk 111) does likewise, while (sk 104) recalculates (sk 80), which
recalculates (sk 56) ...

So, the answer to your question is "probably not". :)

-- 
Protege: What is this seething mass of parentheses?!
Master: Your father's Lisp REPL. This is the language of a true
hacker. Not as clumsy or random as C++; a language for a more
civilized age.

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to