🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.functional
Article #1105

Why such poor recursive behaviour?

#1105
From: namekuseijin
Date: Thu, 31 Jul 2008 08:01
35 lines
2805 bytes
I wonder why most functional programming languages fail so badly at
what should be one of their primary main strengths:  recursive
functions.

In the well-known benchmarking game called "The computer game
shootout", most such languages fail miserably in the face of blazing
fast imperative code during the benchmarking of recursive functions
such as ackermann or fibonacci:

http://shootout.alioth.debian.org/gp4/benchmark.php?test=recursive&lang=all

The best is clean, only 1.6 slower than gcc C.

The chart:
1.6 Clean
3.2 OCaml (just behind Fortran and Java!)
3.3 F# (running in mono)
3.4 SML on MLton (just after FreeBasic!)
3.4 Haskell GHC (just after Java on gcj!  almost a tie-in)
3.6 CL on SBCL (almost as good as compiled lazy static Haskell)
3.7 Scheme on Chicken (just after sbcl)
4.0 SML/NJ (just after C# on mono)
4.6 Scheme on Ikarus (just after Java -client!)
8.1 Scheme PLT (just after Fortran, again)

Well, that's about it.

I know in the grand scheme of things, such timings are not that bad,
not orders of magnitude slower like some of the dynamic scripting
stinkers in the bottom, specially in the face of such classy and easy
syntax and semantics adding to programmer productivity.  Still, kind
of a let down, like buying a Playstation 3 and waiting for a killer
app that never comes...

Any thoughts?
Technical Details
Message-ID: <525fb940-a88e-4276-bd80-86b0b178a08a@m3g2000hsc.googlegroups.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!postnews.google.com!m3g2000hsc.googlegroups.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: 107f24,904ab2e1d637ae0f,start
X-Google-Thread: ff861,904ab2e1d637ae0f,start
X-Google-Thread: 10707f,904ab2e1d637ae0f,start
X-Google-Thread: 103d24,904ab2e1d637ae0f,start
X-Google-Thread: f4fd2,904ab2e1d637ae0f,start
X-Google-Attributes: gid107f24,gidff861,gid10707f,gid103d24,gidf4fd2,domainid0,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
Path: arc1-ca.pugleaf.net!g2news1.google.com!postnews.google.com!m3g2000hsc.googlegroups.com!not-for-mail
From: namekuseijin <namekuseijin@gmail.com>
Newsgroups: comp.lang.functional,fa.caml,fa.haskell,comp.lang.scheme,comp.lang.lisp
Subject: Why such poor recursive behaviour?
Date: Thu, 31 Jul 2008 01:01:37 -0700 (PDT)
Organization: http://groups.google.com
Lines: 35
Message-ID: <525fb940-a88e-4276-bd80-86b0b178a08a@m3g2000hsc.googlegroups.com>
NNTP-Posting-Host: 189.60.59.171
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-Trace: posting.google.com 1217491298 11399 127.0.0.1 (31 Jul 2008 08:01:38 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Thu, 31 Jul 2008 08:01:38 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: m3g2000hsc.googlegroups.com; posting-host=189.60.59.171; 
 posting-account=AhEwOgoAAABfI1IAWWBiHDSU2pvzqVnt
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; pt-BR; rv:1.9.0.1) 
 Gecko/2008070208 Firefox/3.0.1,gzip(gfe),gzip(gfe)