Method dispatch overhead. When you say foo( $a ) whatever foo in the current scope is called dirrectly. When you say $obj->bar( $b ), then perl has to check what $obj is (a scalar holding a blessed ref? a class name), then try and call Whatever::bar, and if that doesn't work try SuperWhatever::bar . . .
Granted there's some caching done, but it's more than just a simple subroutine call.
In reply to Re: Why are objects slower than procedural subs/data structs?
by Fletch
in thread Why are objects slower than procedural subs/data structs?
by Sol-Invictus
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |