*To*: Gottfried Barrow <igbi at gmx.com>*Subject*: Re: [isabelle] 64-bit Java is 6x faster than 32-bit for a recursive fibonacci*From*: James McDonald <mcdonald at kestrel.edu>*Date*: Sat, 17 May 2014 16:25:30 -0700*Cc*: Makarius <makarius at sketis.net>, Richard Waldinger <waldinger at AI.SRI.COM>, cl-isabelle-users at lists.cam.ac.uk*In-reply-to*: <E5A9AA96-C476-445D-97ED-F5C10BC1624F@kestrel.edu>*References*: <5374E9FA.1010201@gmx.com> <5374F12E.2030901@gmx.com> <alpine.LNX.2.00.1405161628320.3424@lxbroy10.informatik.tu-muenchen.de> <5376399E.5060306@gmx.com> <8B7099FA-D82C-4E2A-B510-4F006D368326@ai.sri.com> <5376A3BA.3040007@gmx.com> <E5A9AA96-C476-445D-97ED-F5C10BC1624F@kestrel.edu>*Resent-date*: Sat, 17 May 2014 17:04:44 -0700*Resent-from*: Richard Waldinger <waldinger at AI.SRI.COM>*Resent-message-id*: <E1Wm6Cm-0002Se-6j@Smtpsx.AI.SRI.COM>*Resent-to*: cl-isabelle-users at lists.cam.ac.uk

[re-sending from jlm—-r] More generally, if you are really trying to benchmark various languages and implementations, you might want to consider a broader suite of tests. E.g., within the lisp world, you could look at Dick Gabriel’s “Performance and Evaluation of Lisp Systems” from around 1985. (http://www.dreamsongs.com/NewFiles/Timrep.pdf) In particular, if your focus is on function call overhead, the TAK and PUZZLE tests might be of interest, including the variants that move things around to account for cache lines. jlm On May 17, 2014, at 4:15 PM, James McDonald <mcdonald at kestrel.edu> wrote: > To get the best timing, I turned up the optimization settings and fully typed everything. > I also used the labels construct to make the recursive calls local, which trimmed about > 0.4 seconds. > > On a newer Macbook Pro (2.6 GHz) the timing with fixnums was 2.09 seconds, > using 5.4 billion cycles, and and with integers it was 4.85 seconds using 12.6 > billion cycles. [The (debug 0) setting had no effect on the fixnum code, but shaved > 0.6 seconds off the integer code.] > > (As an aside, note that with SBCL on a 64-bit machine, most-positive-fixnum is > 4611686018427387903, which would be between (fib 90) and (fib 91). ) > > (in-package :cl-user) > > (proclaim '(optimize (speed 3) (safety 0) (space 0) (debug 0) (compilation-speed 0))) > > (defun fib (n) > (declare (fixnum n)) > (labels ((aux (n) > (declare (fixnum n)) > (the fixnum > (if (< n 2) > n > (+ (the fixnum (aux (the fixnum (- n 1)))) > (the fixnum (aux (the fixnum (- n 2))))))))) > (aux n))) > > > > > On May 16, 2014, at 4:48 PM, Gottfried Barrow <igbi at gmx.com> wrote: > >> On 14-05-16 11:26, Richard Waldinger wrote: >>> >>>>> From: James McDonald <mcdonald at kestrel.edu> >>>>> 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> >>> >>>> 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. >> >> Richard, >> >> Thanks for the info from James McDonald. I was confused about SBCL. I had installed it, but I thought the instructions on how to build it was part of what to do to compile a script. When sorting through 20 languages, unfamiliarity and some resistance can cause me to abandon testing a language out. >> >> This worked out better, because I hadn't downloaded the newest version for Windows. >> >> With SBCL on Windows, with the default options, I get 5.6 seconds for fixnum, and 9.8 seconds for integer. I'm running a 2.8GHz old quad core, where it only utilizes 25% of the cpu when it's running the program. >> >> Where SBCL really separates itself is with big integers, because fib(42) is only 4807526976. That wasn't forcing these other languages to use non-machine integers, the ones that don't make you choose. I say more about that in my reply to Makarius. >> >> Regards, >> GB >> >> >

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

**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

**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:*Gottfried Barrow

- Previous by Date: Re: [isabelle] 64-bit Java is 6x faster than 32-bit for a recursive fibonacci
- Next by Date: [isabelle] Re2: DAGs Miracle
- 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