Re: [isabelle] 64-bit Java is 6x faster than 32-bit for a recursive fibonacci

from jim mcdonald (cc-ed):

> Begin forwarded message:
>> From: James McDonald <mcdonald at>
>> Subject: Re: speed of functional language implementations
>> Date: May 15, 2014 at 1:11:05 PM PDT
>> To: Richard Waldinger <waldinger at AI.SRI.COM>
>> Cc: AIC-COFFEE AIC-COFFEE <aic-coffee at AI.SRI.COM>, Kestrel Technical <kestrel-technical at>
>> On a Macbook Pro (2.3 GHz)  I get 2.4 seconds for fully optimized SBCL, using fixnums.
>> If I use integers instead, it is 7.8 seconds.

>>> (if (n < 2) then n else (fib(n - 1) + fib(n - 2)));

On May 15, 2014, at 12:22 PM, Gottfried Barrow <igbi at> wrote:

> On 14-05-15 11:23, Gottfried Barrow wrote:
>> What I can say is that Scala is fast, and most everything else is slow in comparison to it, though several things have to be taken into consideration, such as whether a language needs to be compile, and whether the integers are machine integers or big integers.
> Complex things aren't that straightforward, and require talking to oneself more than one would like.
> With Scala, using BigInt, it takes 77s, and with Clojure using bigint, it takes 21s. That assumes that things are doing what I think I've told them to do, which means one should do one's own tests. I thought I had read that Erlang's default integer is a machine integer, but maybe I'm reading now that it's of arbitrary size, which means, at 16s, it would be faster than Clojure, and arbitrary size integers is what I'd be using. Clojure actually doesn't make you pick; it chooses what works best. With Clojure, it's a 3megabyte jar to get the language. With Erlang, it's a 90megabyte install.
> Regards,
> GB

This archive was generated by a fusion of Pipermail (Mailman edition) and MHonArc.