Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: possible to write translate program from recursive C to no recursive C?

Author: Uri Blass

Date: 00:39:33 09/15/03

Go up one level in this thread


On September 15, 2003 at 02:56:24, Reinhard Scharnagl wrote:

>Hi Uri,
>
>>Can programmers write a program that take a code with recursive functions and
>>translate it to a code without recursive functions that does the same thing?
>>
>>Do not answer me that the compiler does it by translating it to assembler
>>because the translation should be done to a program in the same computer
>>language so a C source should be translated to another C source.
>
>it could be done by locally implementing a kind of a stack. You have
>therefore to think about maximum call limits. Sometimes a simple loop
>already will do the aimed task.
>
>But what is the reason for such a non recursiv approach? What is
>wrong with using recursion?
>
>Regards, Reinhard.

I read that recursion is bad for parallel program and there is information
that I practically remember twice so maybe it is not good also for non parallel
program.

If I want to check if the king was in check 2 plies earlier then I need to look
at a special array for that purpose and I understand that with non recursive
approach I can get the information without remembering it twice.

Uri



This page took 0 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.