To my great suprise the OO version seems to work faster despite having more lines of code and additional complexity. Can anyone explain why?
Given that the procedural code you've posted here is still an order of magnitude slower than this version, the difference in performance between the two versions you've posted comes down to differences in the algorithms, and the implementations of those algorithms, not to the relative performance of perl's function and method calls.
The two posted versions do not even produce the same solution, so you are comparing apples with oranges and claiming the lemon juice produced tastes sweeter.
In reply to Re: Procedural Perl slower than OO Perl!!! (Not!)
by BrowserUk
in thread Procedural Perl slower than OO Perl!!!
by Christian888
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |