Re: Lambda efficiency

2010-06-22 Thread Andy Wingo
Heya, On Tue 22 Jun 2010 21:18, Michael Lucy writes: > I'm generating some code, and I was wondering if: > ((lambda (x) (* x 2)) 3) > is significantly less efficient than: > (* 3 2) ((lambda (x) y) z) is reduced to (let ((x z)) y) at compile-time. We don't inline x yet, though we will soon. Ve

Lambda efficiency

2010-06-22 Thread Michael Lucy
Hey, I'm generating some code, and I was wondering if: ((lambda (x) (* x 2)) 3) is significantly less efficient than: (* 3 2) or if the Guile compiler will take care of that for me (the expression is going to be evaluated a lot).