*To*: Makarius <makarius at sketis.net>*Subject*: Re: [isabelle] 64-bit Java is 6x faster than 32-bit for a recursive fibonacci*From*: Gottfried Barrow <igbi at gmx.com>*Date*: Fri, 16 May 2014 11:15:26 -0500*Cc*: cl-isabelle-users at lists.cam.ac.uk*In-reply-to*: <alpine.LNX.2.00.1405161628320.3424@lxbroy10.informatik.tu-muenchen.de>*References*: <5374E9FA.1010201@gmx.com> <5374F12E.2030901@gmx.com> <alpine.LNX.2.00.1405161628320.3424@lxbroy10.informatik.tu-muenchen.de>*User-agent*: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:11.0) Gecko/20120312 Thunderbird/11.0

On 14-05-16 09:35, Makarius wrote:

This kind of example is generally called "micro benchmark". It is funto play with it, but hardly relevant in practice.

On 14-05-15 11:23, Gottfried Barrow wrote:fun fib (n:int) = (if (n < 2) then n else (fib(n - 1) + fib(n - 2)));This kind of example is generally called "micro benchmark". It is funto play with it, but hardly relevant in practice. There are so manyside-conditions to take into account in a real application, to say ifit is fast or not. E.g. proper integer arithmetic depends on thelibray that does that in the background, while machine integers arenot integers at all.

There are so many side-conditions to take into account in a realapplication, to say if it is fast or not.

It bugs me that when calculating fib(42), the Java process only works25% of my CPU.Here is a version for Isabelle/ML that uses approx. 0% of CPU:

See alsohttp://www.cs.northwestern.edu/academics/courses/110/html/fib_rec.htmlwhich happened to be the first page Google spit out on this well-knownexercise for freshmen.

To keep this on-track for isabelle-users, I propose that you make asmall formalization in Isabelle/HOL to relate the two implementations.

Regards, GB

**Follow-Ups**:**Re: [isabelle] 64-bit Java is 6x faster than 32-bit for a recursive fibonacci***From:*Makarius

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

**[isabelle] building the afp sample submission***From:*Viorel Preoteasa

**References**:**[isabelle] 64-bit Java is 6x faster than 32-bit for a recursive fibonacci***From:*Gottfried Barrow

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

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

- Previous by Date: Re: [isabelle] 64-bit Java is 6x faster than 32-bit for a recursive fibonacci
- Next by Date: Re: [isabelle] 64-bit Java is 6x faster than 32-bit for a recursive fibonacci
- Previous by Thread: Re: [isabelle] 64-bit Java is 6x faster than 32-bit for a recursive fibonacci
- Next by Thread: Re: [isabelle] 64-bit Java is 6x faster than 32-bit for a recursive fibonacci
- Cl-isabelle-users May 2014 archives indexes sorted by: [ thread ] [ subject ] [ author ] [ date ]
- Cl-isabelle-users list archive Table of Contents
- More information about the Cl-isabelle-users mailing list