Article View: comp.lang.misc
Article #7083Re: Use scheme || nothing
From: Robert Sanders
Date: Fri, 04 Nov 1994 05:23
Date: Fri, 04 Nov 1994 05:23
39 lines
2703 bytes
2703 bytes
In article <39bjl5$bi0@csnews.cs.Colorado.EDU>, Tom Christiansen <tchrist@mox.perl.com> wrote: >:-> In gnu.misc.discuss, rsanders@mindspring.com (Robert Sanders) writes: >:>Translating ksh93, perl5, or python into scheme will only slow them >:>down. Why ever would you want to do this? >:Why do you think that? Almost every Scheme interpreter I've tried outruns >:python, ksh, and perl on simple benchmarks like arithmetic and function >:calling. >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. Scheme outran perl in simple iteration and arithmetic -- there were no subroutine calls in the perl version. Remember Ilya Zakharevich's tiny benchmark on perl5-porters that showed that %OVERLOAD wasn't very expensive? Well, taking this as an example, uncompiled SCM, Scheme48, OakScheme and VSCM all outran perl4. SCM and Scheme48 both outran perl5 by a few percent. Compiled SCM and Scheme->C versions are around 30x faster than perl5 on this particular `benchmark', and Scheme compiled with bigloo is around 90x faster. So you're right, you shouldn't listen to that "10x slower" drivel. It's a bit conservative :-) Seriously, most of the things you do with Perl or GEL aren't (going to be) limited by the speed of the interpreter itself. I do most of my day-to-day programming in Perl, and profiling would probably show that the majority of the time is spent in I/O and regexp matching. Perl is usually `plenty fast', but I'm still not sure why you think translating ksh93, Perl, or python into Scheme will slow them down. Could you clarify your point, please? -- Robert
Technical Details
Message-ID:
<39cgg7$a22@henri.mindspring.com>Path:
arc1-ca.pugleaf.net!bga.com!news.sprintlink.net!hookup!swrinde!emory!metro.atlanta.com!nntp.mindspring.com!rsandersReferences:
<394kll$kso@csnews.cs.Colorado.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-03 21:23:19 PST Path: arc1-ca.pugleaf.net!bga.com!news.sprintlink.net!hookup!swrinde!emory!metro.atlanta.com!nntp.mindspring.com!rsanders From: rsanders@mindspring.com (Robert Sanders) Newsgroups: comp.lang.misc,gnu.misc.discuss Subject: Re: Use scheme || nothing Date: 4 Nov 1994 05:23:19 GMT Organization: MindSpring Enterprises, Inc. Lines: 40 Message-ID: <39cgg7$a22@henri.mindspring.com> References: <394kll$kso@csnews.cs.Colorado.EDU> <398vo8$ari@csnews.cs.Colorado.EDU> <399h73$8e8@henri.mindspring.com> <39bjl5$bi0@csnews.cs.Colorado.EDU> NNTP-Posting-Host: hrothgar.mindspring.com