[fpc-devel] Tail recursion optimization

Daniël Mantione daniel.mantione at freepascal.org
Tue Oct 10 10:05:25 CEST 2006



Op Tue, 10 Oct 2006, schreef Florian Klaempfl:

> Yesterday, I've implemented tail recursion optimization
> (http://svn.freepascal.org/svn/fpc/trunk/compiler/opttail.pas resulting in
> http://www.hu.freepascal.org/fpcircbot/cgipastebin?msgid=158 pp11 is the new
> compiler, fpc11 the old, both are 2.1.1).

Wow!

> It isn't enabled yet because it still
> needs some fine tuning. The question is however when should it be enabled? With
> -OoTAILREC? -O3? Something different?

If the optimization needs significant processing power, -O3. If it doesn't 
but is debug safe, -O1, if it is not debug safe, -O2.

A separate option -OoTAILREC is IMHO not necessary.

Daniël


More information about the fpc-devel mailing list