[MSLUG] Tail call elimination with GCC

Yannick Gingras ygingras at ygingras.net
Wed Apr 9 06:03:51 EDT 2008


Greetings Lispers of Montréal, 
  I just did some test with GCC's tail call elimination.  The result is
quite impressive: the tail recursive version of a Mandelbrot set
generator runs faster than the iterative one.

  http://ygingras.net/b/2008/4/tail-call-elimination-is-good-in-c-too

I still don't know how to explain this.  At the very least, the
recursive version should be slower by one extra function call.  Anyone
knows how it's possible to produce better machine code for the tail
recursive version?

Best regards, 

-- 
Yannick Gingras


More information about the MSLUG mailing list