Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: question about local and global variables

Author: Daniel Clausen

Date: 11:43:29 09/03/01

Go up one level in this thread


Hi

On September 02, 2001 at 11:47:55, Rafael Andrist wrote:

>1) a procedure is called very often. Using a local variable, you need time to
>allocate/deallocate it or the adress calculation of the local variable may need
>more time than the one for a global variable.

It doesn't use extra time to allocate/deallocate local variables. Local
variables reside on the stack and are basically an offset to a fixed address
(the stack pointer) in a function.

Sargon



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.