Re: [Chicken-users] About peformance of user defined procedures

2011-08-03 Thread Jörg F . Wittenberger
On Aug 1 2011, Kon Lovett wrote: On Aug 1, 2011, at 1:05 PM, Jörg F. Wittenberger wrote: On Aug 1 2011, Pedro Henrique Antunes de Oliveira wrote: Interesting point. But I tried it out. In average, it took about the same amount of time (actualy this was about 0.1s slower). Looking closer

Re: [Chicken-users] About peformance of user defined procedures

2011-08-01 Thread Jörg F . Wittenberger
just a wild guess: On Jul 31 2011, Pedro Henrique Antunes de Oliveira wrote: Hey. I have a file map.scm, which contais this code: (define (mymap1 op ls) (let loop ((ls ls) (acc '())) (if (null? ls) (reverse acc) (loop (cdr ls) (cons (op (car ls)) acc)

Re: [Chicken-users] About peformance of user defined procedures

2011-08-01 Thread Pedro Henrique Antunes de Oliveira
Interesting point. But I tried it out. In average, it took about the same amount of time (actualy this was about 0.1s slower). Maybe because the amount of time spent on binding arguments to parameters is larger than the amount of time of that (procedure? op). I've heard that some compilers can

Re: [Chicken-users] About peformance of user defined procedures

2011-08-01 Thread Jörg F . Wittenberger
On Aug 1 2011, Pedro Henrique Antunes de Oliveira wrote: Interesting point. But I tried it out. In average, it took about the same amount of time (actualy this was about 0.1s slower). Looking closer (since you made me curious); there is little magic about the definition of map as far as I

[Chicken-users] About peformance of user defined procedures

2011-07-30 Thread Pedro Henrique Antunes de Oliveira
Hey. I have a file map.scm, which contais this code: (define (mymap1 op ls) (let loop ((ls ls) (acc '())) (if (null? ls) (reverse acc) (loop (cdr ls) (cons (op (car ls)) acc) (define (mymap2 op ls) (let loop ((ls ls)) (if (null? ls) '() (cons (op

Re: [Chicken-users] About peformance of user defined procedures

2011-07-30 Thread Kon Lovett
On Jul 30, 2011, at 4:43 PM, Pedro Henrique Antunes de Oliveira wrote: Hey. I have a file map.scm, which contais this code: (define (mymap1 op ls) (let loop ((ls ls) (acc '())) (if (null? ls) (reverse acc) (loop (cdr ls) (cons (op (car ls)) acc) (define

Re: [Chicken-users] About peformance of user defined procedures

2011-07-30 Thread Pedro Henrique Antunes de Oliveira
I've taken a look at compiler macros. I see how it could help with performace, but I don't get how it would help in this case. Could you explain? On Sat, Jul 30, 2011 at 8:51 PM, Kon Lovett konlov...@gmail.com wrote: On Jul 30, 2011, at 4:43 PM, Pedro Henrique Antunes de Oliveira wrote: Hey.