[plt-dev] `unsafe-fl' and unboxing

From: Eli Barzilay (eli at barzilay.org)
Date: Sun Oct 4 16:59:49 EDT 2009

On Oct  4, Dave Herman wrote:
> I'm not sure whether the mzscheme compiler obeys the Macro Writer's  
> Bill of Rights in optimizing the case where exp is just a variable  
> reference.

-> (compile '(define (fib1 n) (if (<= n 1) n (+ (fib1 (- n 1)) (fib1 (- n 2))))))
#~<binary junk>

-> (compile '(define (fib2 n) (let* ([x n] [n x]) (if (<= n 1) n (+ (fib2 (- n 1)) (fib2 (- n 2)))))))
#~<same-looking binary junk>

-- 
          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                    http://barzilay.org/                   Maze is Life!


Posted on the dev mailing list.