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 through the STHASH looking for a
localized or glo
--- 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 iterat
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 pac
--- 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 p
--- 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 Aas (maybe
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..
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
Paul wrote:
> None of this is critical for anything I'm doing right now, but I'm a
> detail hound. I want to *understand* it, so that in the future I can
> make intelligent decisions about what would be a "better" way to write
> any given algorithm, without just relying on popular wisdom and "urba
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:
> >
>
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
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
>
11 matches
Mail list logo