[Top][All Lists]

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

Re: [Chicken-users] [Chicken-hackers] Any thoughts on performance woes?

From: Dan Leslie
Subject: Re: [Chicken-users] [Chicken-hackers] Any thoughts on performance woes?
Date: Tue, 07 Apr 2015 09:25:29 -0700

Felix Winkelmann <address@hidden> writes:
> This is a terribly written program. It uses 3-element lists as vectors
> (including higher-order "vector" arithmetic using "map") and allocates
> like hell. The compiler can not do much with this code, and it
> produces CPS calls everywhere.

I take it you are referring to the {add, sub, scale, mul, dot,
squared-length, normal} functions? It seems clear to me that there's
plenty of room for optimization in them, but I wonder if you're being a
bit hasty to dismiss the naive implementation so readily. IMHO, use of
`map` to transform lists is sort of idiomatically lisp.

That is to say, in this case there are alternatives for numerical
computation, but transforming a list in a similar manner ought to be
commonplace in lispy programmes. If it is this sort of behaviour that
drives the GC into agony then I expect that there are many Chicken
programmes that may benefit from any form of optimization that could be
had from `map`.


-Dan Leslie

reply via email to

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