[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-hackers] Benchmark for "values" - interesting results
From: |
John Cowan |
Subject: |
Re: [Chicken-hackers] Benchmark for "values" - interesting results |
Date: |
Fri, 24 May 2013 09:25:59 -0400 |
User-agent: |
Mutt/1.5.20 (2009-06-14) |
Jörg F. Wittenberger scripsit:
> On May 22 2013, Peter Bex wrote:
> >We already knew the SRFI implementations shipped with CHICKEN are
> >extremely inefficient. It's been a plan to rewrite some of them
> >using faster internal versions for a while. Also, the design of
> >SRFI-1 and SRFI-13 is pretty stupid when considering efficiency,
> >because many procedures gratuitously accept multiple arguments
> >and when called differently the procedures may even do slightly
> >different things, which makes it hard to optimize for.
>
> I'm not familiar with Chickens optimizer. Could Chicken pass
> the ordinary first class value when used as variable reference
> and still overload the name with a syntactic binding? This
> should make it rather easy to add some syntax atop of those SRFIs
> to dispatch to fixed-args-one-case versions for efficiency.
I've always thought that case-lambda should be built into the core,
so that simple tail recursions, like this:
(define foo (case-lambda
((bar baz) ...)
((baz) (foo #f baz))))
can be rewritten as a varargs function with appropriate internal jumps,
without the need to construct and then deconstruct a list.
--
By Elbereth and Luthien the Fair, you shall address@hidden
have neither the Ring nor me! --Frodo http://www.ccil.org/~cowan