Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
Re: Making an Object faster?by jpeg (Chaplain) |
on Jun 16, 2005 at 21:58 UTC ( [id://467466]=note: print w/replies, xml ) | Need Help?? |
I've never done tests myself, but here's what the Camel has to say:
The logic of abstraction comes at a price. Because of the late resolution of methods, an object-oriented solution in Perl is likely to run slower than the corresponding non-OO solution. For some of the fancier techniques described later, it could be a lot slower. However, many common problems are solved not by working faster, but by working smarter. That's where OO shines.Camel 3rd edition, section 12.3 I could swear I've seen "20% slower" in an earlier version of the Camel, but I can't find it now. Obviously, depending on the code/hardware, YMMV.
-- jpg
In Section
Seekers of Perl Wisdom
|
|