On Tue, 27 Mar 2001, Simon Wilcox wrote:
> At 16:53 27/03/2001 +0100, Robin Houston wrote:
> >On Tue, Mar 27, 2001 at 05:40:19PM +0200, Philip Newton wrote:
> > > Well, remember that the sub effecticaly recalculates (what amounts to) the
> > > array each time. To be fair, you should include the array initialisation
> > > inside the loop and see who wins then.
> >Hey, that's not _fair_!
> >The whole point of using an array is that you can pre-populate it.
> >(also it's more concise, and I find it more comprehensible. YMMV)
> I agree, it's how I would have done it. I was just trying to see it really 
> deserved the label "evil and gross hack".

Because it was only meant to deal with things up to 31, if you try and
(for some reason) try to put 32 in, you would get 32th (because it has
populated the array). I don't like that kind of thing. It's a personal
choice. I think the bit I objected to most was the $th[31]="st" bit. I
shouldn't have put it like that, but as Robin says, TIMTOWTDI,so yeah.

> It seems to me that it doesn't but as you say, YMMV and I got to practice 
> my benchmarking :-)

:) I did expect it to be slower, it also copes with any number.

MBM

-- 
Matthew Byng-Maddick   Home: <[EMAIL PROTECTED]>  +44 20  8980 5714  (Home)
http://colondot.net/   Work: <[EMAIL PROTECTED]> +44 7956 613942  (Mobile)
Knebel's Law:     It is now proved beyond doubt that smoking is one of the
                  leading causes of statistics.

Reply via email to