Perl: the Markov chain saw | |
PerlMonks |
Re: Re: Re: Re: Re: Re: string manipulationby extremely (Priest) |
on Mar 30, 2001 at 04:23 UTC ( [id://68249]=note: print w/replies, xml ) | Need Help?? |
Your test strings don't have any '-' hyphens in them. =)
And you change assignment forms between the two subs which
honestly shouldn't have much effect but is still questionable
practice when benchmarking since you want the code identical
in nature except for the key point you are testing...
Also, since the $data is set in the sub it will be reset every pass. As well, you can just set up the benchmark like this and avoid having perl eval a sub call in a string:
Not a big deal but it may save you some typing in the future. Your way has the benefit of being easy to run the subs once and test their output, tho... BTW, I moronically goofed my test string too... =) --
In Section
Seekers of Perl Wisdom
|
|