[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] More idomatic code (Language Shootout)

From: felix winkelmann
Subject: Re: [Chicken-users] More idomatic code (Language Shootout)
Date: Wed, 11 May 2005 20:26:19 +0200

On 5/11/05, Greg Buchholz <address@hidden> wrote:
> ...turned out to be only about 2x slower than the original (let's ignore
> the fact that it is 70x slower than C).  The main changes I made were to
> simplify the program by using vector math, and to try and replace "do"
> loops and mutation with higher-order functions working on lists.  I was
> wondering if anyone would care to take a look at the code and see if
> there were any easy things I was missing (being a Scheme novice and
> all) to make the code cleaner, more idomatic, and/or faster.

Looks fine to me. Your code might very well be more idiomatic, I guess.
Your solution allocates more than the original version, but allocation
is cheap, so the speed penaltiy isn't that heavy.

I can't comment on your style, though - the Scheme code I write nowadays
has gotten pretty ugly lately... ;-)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]