-
Notifications
You must be signed in to change notification settings - Fork 571
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Optimize assigning to scalars from @_ #12342
Comments
From @xdgCreated by @xdgThis ticket suggests a possible peephole optimization, should someone In short, a huge number of pure Perl subroutines start off like this: sub foo { This assignment requires multiple OPs to execute: $ perl -MO=Concise,foo,-exec -e 'sub foo {my ($one, $two) = @_; dump }' If this is predictable and detectable at the start of a subroutine -- (I don't know if similar optimization could be made to work -- or would -- David Perl Info
|
From @cpansproutOn Wed Aug 22 08:03:08 2012, dagolden@cpan.org wrote:
One thing you would have to be careful of is &foo-style calls, that XS modules can get the caller’s arguments via get_av("_"), and any sub I don’t think this optimisation is possible. -- Father Chrysostomos |
The RT System itself - Status changed from 'new' to 'open' |
From @ap* Father Chrysostomos via RT <perlbug-followup@perl.org> [2012-08-31 23:15]:
Pardon my ignorance in perlguts, but as far as I can tell within the Were all of that correct, then the answer to your objections should seem Is it? Am I missing something? Regards, |
From @cpansproutOn Sun Sep 02 09:01:53 2012, aristotle wrote:
I understood this to be a follow-up to Nicholas Clark’s suggestion of David mentioned copying straight from the stack to the pad, so I thought If my ($foo,$bar) = @_ occurs at the beginning of a subroutine, then the Optimising my($foo,$bar)=... in general might be possible. The speed -- Father Chrysostomos |
From @iabynOn Sun, Sep 02, 2012 at 11:05:02AM -0700, Father Chrysostomos via RT wrote:
I already have a plan for this. The speedup might actually be In more detail: the basic idea is to is to replace the expression my ($a,$b,$c) = @_ goes from being pushmark s The new op's action is to I think this could be a big performance win. It speeds up sub entry: I plan to look into this further once I've finished off the regex copying -- |
Migrated from rt.perl.org#114536 (status was 'open')
Searchable as RT114536$
The text was updated successfully, but these errors were encountered: