ISAI student has asked for the wisdom of the Perl Monks concerning the following question:
However, it could be faster (it is in Python) to do the following:foreach my $var (@something) { $self->isInst($var) }
Same may be done for other references, which need be accessed via the scalar $self. From knowing the internals of the PERL 5.8.8 engine, should there be any difference? Are there any known reccomendations? I could not find any.my $func_Ref=\&$self->isInst; foreach my $var (@something) { &$func_Ref($var) }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: local vs. $self-> pointer to subroutine
by BrowserUk (Patriarch) on May 23, 2011 at 15:59 UTC | |
|
Re: local vs. $self-> pointer to subroutine
by Corion (Patriarch) on May 23, 2011 at 15:55 UTC | |
|
Re: local vs. $self-> pointer to subroutine
by LanX (Saint) on May 23, 2011 at 17:13 UTC | |
by Anonymous Monk on May 23, 2011 at 18:36 UTC | |
by LanX (Saint) on May 23, 2011 at 19:57 UTC | |
by Anonymous Monk on May 23, 2011 at 20:32 UTC | |
by LanX (Saint) on May 23, 2011 at 20:48 UTC | |
|