[racket] a little macro exercise

From: Neil Van Dyke (neil at neilvandyke.org)
Date: Sat Oct 9 22:46:49 EDT 2010

David Herman wrote at 10/09/2010 10:30 PM:
> I think you may be missing a crucial point: once control hits the first passing test, there are no more conditionals; every right-hand side is compiled as a procedure that unconditionally tail-calls the next right-hand side. IINM, this is pretty much the same way `switch' is typically compiled: each case is treated as a basic block boundary, and compilers often connect up basic blocks with explicit jumps in the IR.

Probably I'm missing something, since you know the compiler better than 
I do.

My understanding is that your code prescribes a series of branching 
tests, rather than giving the compiler a single n-way "case" and letting 
the compiler decide what the individual branch tests should be.  That's 
the difference I was wondering about.

Regarding chaining local closures with tail calls that are easy to 
optimize, I thought I had the same thing going on in my code.


Posted on the users mailing list.