in reply to Re: Optimizing non-alphanumeric method calls
in thread Optimizing non-alphanumeric method calls
Thanks for your reply.
$obj->$c_method is indeed faster, but it cannot be used, unfortunately, on chained method calls, such as $obj->$method_1->$method_2, unless the result returned by $obj->$method_1 is stored somewhere, which I guess it may slow things down quite a bit.
Regarding your second idea, I haven't tried control characters as method names yet, but it's a good idea. However, I'm not sure how safe it is to rely on this behavior as it may get deprecated in the future and forbidden by Perl (assuming that it currently works).
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Optimizing non-alphanumeric method calls
by LanX (Saint) on Sep 27, 2015 at 19:12 UTC | |
by trizen (Hermit) on Sep 27, 2015 at 19:42 UTC | |
by LanX (Saint) on Sep 27, 2015 at 19:56 UTC | |
by BillKSmith (Monsignor) on Sep 27, 2015 at 20:10 UTC | |
by LanX (Saint) on Sep 27, 2015 at 20:21 UTC |