This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
This commit speeds up class method calls when class name is constant.
authorsyber <syber@crazypanda.ru>
Fri, 21 Nov 2014 17:21:00 +0000 (20:21 +0300)
committerFather Chrysostomos <sprout@cpan.org>
Mon, 24 Nov 2014 06:09:27 +0000 (22:09 -0800)
commitb55b14d0f234ed20e6c2a0b6fd8609fa418cddf3
tree3302df9d73f287990c0d3518211fbc4d02287384
parent3ea8bc937be5cc09bfcc0beabb3ac6c672b01b67
This commit speeds up class method calls when class name is constant.

I.e.
MyClass->method()
and
MyClass->$dynamic_method()

By about 30%.

It was done by saving class name (as shared COW string) in METHOP
and later checking it in method_common().

If it was set, then it fetches stash via gv_stashsv using precomputed
hash value instead of falling into a bunch of conditions and fetching
stash without hash value.
op.c
op.h
pp_hot.c