Re: Very[OT]:Technical query re: scratchpad lookups for my() vars

2001-03-15 Thread Malcolm Beattie
Paul writes: --- Brian Ingerson [EMAIL PROTECTED] wrote: Garrett Goebel wrote: From: Paul [mailto:[EMAIL PROTECTED]] Anybody know offhand *why* my() lexicals are supposedly faster? Yes this is OT, but I'll contribute to the problem as well... My coworker Gisle

Re: Very[OT]:Technical query re: scratchpad lookups for my() vars

2001-03-15 Thread Alexander Farber (EED)
Paul wrote: --- Robert Landrum [EMAIL PROTECTED] wrote: I could be wrong, but as I recall, when your program enters a scope, perl immediatly identifies the the scratchpad to use. Then, it need only search backwards up the tree of scratchpads to find the variable "$x", which is faster

Re: Very[OT]:Technical query re: scratchpad lookups for my() vars

2001-03-15 Thread Paul
Many thanks to everyone, Malcolm in particular, for humoring my curiosity and assisting my esoteric research. Hope it helped someone else, too, and sorry for cluttering up the board. But it *dod* say it was Very[OT]. ;o) Paul --- Malcolm Beattie [EMAIL PROTECTED] wrote: Paul writes: ---

RE: Very[OT]:Technical query re: scratchpad lookups for my() vars

2001-03-15 Thread Garrett Goebel
Title: RE: Very[OT]:Technical query re: scratchpad lookups for my() vars From: Paul [mailto:[EMAIL PROTECTED]] Anybody know offhand *why* my() lexicals are supposedly faster? Because a dynamic variable allocates a new value at runtime which occludes the global value until it's scope

Re: Very[OT]:Technical query re: scratchpad lookups for my() vars

2001-03-15 Thread Brian Ingerson
Garrett Goebel wrote: From: Paul [mailto:[EMAIL PROTECTED]] Anybody know offhand *why* my() lexicals are supposedly faster? Because a dynamic variable allocates a "new" value at runtime which occludes the global value until it's scope expires. In contrast, a lexical variable is unique

Very[OT]:Technical query re: scratchpad lookups for my() vars

2001-03-14 Thread Paul
Anybody know offhand *why* my() lexicals are supposedly faster? If they're stored on a scratchpad for the scope, which is an array, (technically a stack of them to accommodate recursion,) then exactly how does Perl go about finding which data location you mean when you say $x for a lexical? $::x

Re: Very[OT]:Technical query re: scratchpad lookups for my() vars

2001-03-14 Thread Paul
--- Robert Landrum [EMAIL PROTECTED] wrote: I could be wrong, but as I recall, when your program enters a scope, perl immediatly identifies the the scratchpad to use. Then, it need only search backwards up the tree of scratchpads to find the variable "$x", which is faster than iterating

Re: Very[OT]:Technical query re: scratchpad lookups for my() vars

2001-03-14 Thread Elizabeth Mattijsen
At 03:52 PM 3/14/01 -0800, Paul wrote: But nothing about the structural/algorithmic mechanics. : From the perlsub docs: Variables declared with my are not part of any package and are therefore never fully qualified with the package name. In particular, you're not allowed to try to make a

Re: Very[OT]:Technical query re: scratchpad lookups for my() vars

2001-03-14 Thread Paul
--- Elizabeth Mattijsen [EMAIL PROTECTED] wrote: At 03:52 PM 3/14/01 -0800, Paul wrote: But nothing about the structural/algorithmic mechanics. : From the perlsub docs: Variables declared with my are not part of any package and are therefore never fully qualified with the package