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).
In reply to Re^2: Optimizing non-alphanumeric method calls
by trizen
in thread Optimizing non-alphanumeric method calls
by trizen
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |