numerics

fast fibonacci in Clojure?

Intro A recent stack overflow question asked about Clojure performance compared to other implementations, with Python and raw java performing vastly better than Clojure1. Now, this is Clojure, so there must be a better way. One of the answers pointed to RosettaCode and Clojure fibonacci implementations there2, so I felt pretty good grabbing the “Doubling Algorithm (Fast)” version given there, which is based on an off-the-cuff github answer from Clojure optimization guru Mike Fikes3.