in reply to need to optimize my sub routine
You have used Devel::DProf, that's a good start. It has told you that most of the time is spent in main(). Unfortunately, and perhaps not unsurprisingly, main also appears to contain most of the code.
To obtain a more fine-grained picture of what is going on, you need to employ line-based profiling. For this, Devel::SmallProf will come in very handy. This will give you an idea of which lines are being hit hard, and which lines are expensive to run. This may give you sufficient information to reconsider your algorithm.
• another intruder with the mooring in the heart of the Perl
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: need to optimize my sub routine
by convenientstore (Pilgrim) on Feb 20, 2008 at 02:04 UTC |