RE : cvs: pear /File_Archive package.xml /File_Archive/Archive/ReaderMimeList.php
| From: | Vincent Lascaux | Date: | Tue, 22 Feb 2005 22:35:01 +0000 |
| Subject: | RE : cvs: pear /File_Archive package.xml /File_Archive/Archive/ReaderMimeList.php | ||
| References: | 1 | Groups: | php.pear.cvs |
| Request: | Send a blank email to pear-cvs+get-29688@lists.php.net to get a copy of this message | ||
> > + Change the MimeList function from an array to a large switch
> (probably more efficient)
>
> Hi Vincent,
>
> I'm curious, did you benchmark this change? I've found arrays to be
up
> to 33% faster than big switch statements, but would be curious to see
if
> it is different in your particular situation.
I did not benchmark this change. I think that what I mean is a switch
(that could be implemented with an array).
If the array is more efficient, I may go back to it... but anyway, the
function is called very rarely, so it's not the perf bottleneck. My
commit log should have been "more appropriate" instead of "probably more
efficient".
I don't know if I'll have time / courage to benchmark the change... but
if someone does, I would be interested by the result 0:)
--
Vincent