Re: [Chicken-users] optimizing mutually recursive loops

2009-02-17 Thread felix winkelmann
On Mon, Feb 16, 2009 at 8:32 AM, Alex Shinn alexsh...@gmail.com wrote: When optimizing my Chicken code for speed, I find one of the most important things is to write the code so that it gets compiled into a single C function with gotos. It's often so important to get this that I end up

Re: [Chicken-users] optimizing mutually recursive loops

2009-02-17 Thread Alaric Snell-Pym
On 16 Feb 2009, at 5:09 pm, Tobia Conforto wrote: Alaric Snell-Pym wrote: Some would say that the matrix multiply should just be written in C and FFIed. In fact, most would just (use blas) or such. But I understand it was just an example. Well, yeah ;-) Concurrent Clean, a Haskell-like

Re: [Chicken-users] optimizing mutually recursive loops

2009-02-17 Thread Peter Bex
On Tue, Feb 17, 2009 at 04:27:40PM +, Alaric Snell-Pym wrote: 2) Yet it'd also be nice to automate some of this by establishing a group of states as a form of lexical scope, declaring some state variables for that scope, and having the states within that scope, when they call each other,

Re: [Chicken-users] optimizing mutually recursive loops

2009-02-17 Thread John Cowan
Peter Bex scripsit: I don't think parameterize is tail-recursive (it uses dynamic-wind), so if you expect procedure calls to be nested deeply, this might not be an option. It is possible to have dynamic binding and tail recursion at the same time, though: see

Re: [Chicken-users] optimizing mutually recursive loops

2009-02-17 Thread felix winkelmann
On Tue, Feb 17, 2009 at 9:36 PM, John Cowan co...@ccil.org wrote: I don't think parameterize is tail-recursive (it uses dynamic-wind), so if you expect procedure calls to be nested deeply, this might not be an option. It is possible to have dynamic binding and tail recursion at the same

Re: [Chicken-users] optimizing mutually recursive loops

2009-02-16 Thread Alaric Snell-Pym
[cunning optimisation stunts] Some would say that the matrix multiply should just be written in C and FFIed. Some would say that Chicken should be improved until you can write natural Scheme code without a thought for performance, and Chicken should general optimal C as good as any human could

Re: [Chicken-users] optimizing mutually recursive loops

2009-02-16 Thread Tobia Conforto
Alaric Snell-Pym wrote: Some would say that the matrix multiply should just be written in C and FFIed. In fact, most would just (use blas) or such. But I understand it was just an example. Concurrent Clean, a Haskell-like purely functional language that, unlike Haskell, implements

[Chicken-users] optimizing mutually recursive loops

2009-02-15 Thread Alex Shinn
When optimizing my Chicken code for speed, I find one of the most important things is to write the code so that it gets compiled into a single C function with gotos. It's often so important to get this that I end up writing very unnatural Scheme code, including manually combining several loops