Path: utzoo!mnetor!uunet!husc6!mailrus!ames!amdahl!nsc!taux01!orr From: orr@taux01.UUCP (Orr Michael ) Newsgroups: comp.lang.pascal Subject: Re: Global variables Message-ID: <529@taux01.UUCP> Date: 28 Mar 88 17:56:30 GMT References: <12654@brl-adm.ARPA> Reply-To: orr@taux01.UUCP (Orr Michael ) Organization: National Semiconductor (Israel) Ltd. Lines: 7 Keywords: gloabl optimizing compilers Summary: gloabl vars reduce optimization oppurtunities As one of a team of compiler-writers, including a pascal compiler, let me note that global variables reduce the compiler's room for optimization. this is because any time you erite through a pointer, potentially you may be changing the value of any global var, so the compiler is prevented from doing a lot of usefull optimizations on that var. (e.g. allocate the variable in a machine register) Michael Orr