Article View: comp.lang.misc
Article #7101Scheme vs. Perl, et al (was Re: Use scheme || nothing)
From: Shriram Krishnamurthi
Date: Fri, 04 Nov 1994 23:30
Date: Fri, 04 Nov 1994 23:30
44 lines
3289 bytes
3289 bytes
Tom Christiansen <tchrist@mox.perl.com> writes: > If you write a fibonacci program, full of deeply nested subroutine > calls, than scheme will run faster -- because perl hasn't optimized > the argument call stack yet. But for many other things it's plenty > fast. Don't listen to this "Perl is 10x slower than Scheme" drivel, > because it's simply not true. Perl and Scheme are *languages*. It is virtually nonsensical to speak of one *language* to be faster than another. Mind you, I'm not directing this to you alone, but also to the people defending the Scheme (or any other) standpoint. Even in a given language, there is often much scope for improvement. For instance, all that R4RS, one of the standards for Scheme, says about vectors versus lists is that the former will "typically" be faster than the latter. "Typically", however, is usually translated to "constant" versus "linear". Tail recursion is indeed important. In practice, however, it's not that big a deal. The Scheme community has been excited for the past twenty years that the general mechanism of function calls can be as fast as the more specific looping mechanisms. Good: I find this exciting too. But when I program in Scheme, I still use loop macros, because these are more intuitive and convenient. On the other hand, large parts of Scheme are still implementable as any conventional language is. Scheme *is* a conventional language if you don't use things like higher-order functions, after all: it is a perfectly reasonable imperative language, which I have used as such. A lot of traditional compiler technology still works. Things still run pretty damn fast if the compiler is reasonably intelligent. Two places we hurt big is in tag checking and arrays, mainly a trade-off between safety (in the technical sense) and performance. I could turn off all of these on a reasonable compiler and not lose any more at that point. I can use soft type checking technology to get reasonable performance *without* sacrificing safety. If you have specific examples of where Scheme -- in theory -- will lose over Perl -- in theory -- please post them. I am (and others like me are) interested in hearing about what people like you use these langauges for, and what problems we need to address. At the same time, go easy on using words like "drivel" in a poor context.
Technical Details
Message-ID:
<39eg6b$9t7@larry.rice.edu>Path:
arc1-ca.pugleaf.net!bga.com!news.sprintlink.net!howland.reston.ans.net!cs.utexas.edu!newsfeed.rice.edu!rice!cs.rice.edu!shriramReferences:
<394kll$kso@csnews.cs.Colorado.EDU> <LIBERTE.94Nov2143656@void.ncsa.uiuc.edu> <398vo8$ari@csnews.cs.Colorado.EDU> <399h73$8e8@henri.mindspring.com> <39bjl5$bi0@csnews.cs.Colorado.EDU>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f891f,9bda08f2f068881f X-Google-Attributes: gidf891f,public X-Google-Thread: 1025b4,9bda08f2f068881f X-Google-Attributes: gid1025b4,public X-Google-ArrivalTime: 1994-11-04 15:30:19 PST Path: arc1-ca.pugleaf.net!bga.com!news.sprintlink.net!howland.reston.ans.net!cs.utexas.edu!newsfeed.rice.edu!rice!cs.rice.edu!shriram From: shriram@cs.rice.edu (Shriram Krishnamurthi) Newsgroups: comp.lang.misc,gnu.misc.discuss Subject: Scheme vs. Perl, et al (was Re: Use scheme || nothing) Date: 4 Nov 1994 23:30:19 GMT Organization: Computer Science, Rice University Lines: 44 Message-ID: <39eg6b$9t7@larry.rice.edu> References: <394kll$kso@csnews.cs.Colorado.EDU> <LIBERTE.94Nov2143656@void.ncsa.uiuc.edu> <398vo8$ari@csnews.cs.Colorado.EDU> <399h73$8e8@henri.mindspring.com> <39bjl5$bi0@csnews.cs.Colorado.EDU> NNTP-Posting-Host: cs.rice.edu