News for hackers. Stuff that matters.
Re:Recursive fibonacci benchmark using top languages on GitHub by joserr on Friday September 28, 2018 @12:18PM (#18094598)
SBCL on my AMD FX(tm)-8350 Eight-Core Processor:

   ~$ sbcl
   This is SBCL 1.4.11, an implementation of ANSI Common Lisp.
   More information about SBCL is available at <http://www.sbcl.org/>.

   SBCL is free software, provided as is, with absolutely no warranty.
   It is mostly in the public domain; some portions are provided under
   BSD-style licenses.  See the CREDITS and COPYING files in the
   distribution for more information.
   * (defun fibonacci-tail-recursive ( n &optional (a 1) (b 1))
           (declare (optimize (speed 3) (safety 0) (debug 0))
                    (type fixnum n a b))
           (if (< n 1)
               a
               (fibonacci-tail-recursive (- n 1) b (+ a b))))

   FIBONACCI-TAIL-RECURSIVE
   * (time (fibonacci-tail-recursive 46))

   Evaluation took:
     0.000 seconds of real time
     0.000001 seconds of total run time (0.000001 user, 0.000000 system)
     100.00% CPU
     2,513 processor cycles
     0 bytes consed
  
     2971215073
   *
Re:Recursive fibonacci benchmark using top languages on GitHub by codr4 on Friday September 28, 2018 @12:48PM (#18094844)
Different machine and superior algorithm, where are you aiming with this?
Re:Recursive fibonacci benchmark using top languages on GitHub by joserr on Friday September 28, 2018 @12:56PM (#18094900)
It's true, I only read recursive Fibonacci. Now I see my mistake.
Re:Recursive fibonacci benchmark using top languages on GitHub by codr4 on Friday September 28, 2018 @03:58PM (#18096542)
That being said, this one [0] gives correct results and runs slightly faster :)

[0] https://gist.github.com/codr4life/59f2c02403b27d551e706f673b...