Have a look at Benchmarking Your Code.
In reply to Re: YA newbie question: benchmarking your scripts? by cjf in thread YA newbie question: benchmarking your scripts? by redemption