|
|
| Welcome to the Monastery | |
| PerlMonks |
Re: Re: Question about benchmarkingby toma (Vicar) |
| on Aug 17, 2001 at 03:59 UTC ( [id://105614]=note: print w/replies, xml ) | Need Help?? |
This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.
There is an example of using the Benchmark module
to compare different algorithms at
this node on
searching for an array index. One difficult part of benchmarking is keeping track of what you have changed, and what effect these changes had. Here is one way to do it: First, isolate the part of your code that needs improvement in a subroutine. Then, create new subroutines with different names to try different approaches. Preserve the different implementations of the subroutine in the program. This ensures that you don't accidentally change something else in your code that ruins your comparison data. The Benchmark node mentioned above shows an example of this approach. If you keep your subroutine short, it is easy for other people, such as Perl Monks, to help speed up your code. It should work perfectly the first time! - toma
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||