Re: [PEPr] Comment on Networking::Net_SMPP
| From: | Ian Eure | Date: | Tue, 19 Jul 2005 22:42:06 +0000 |
| Subject: | Re: [PEPr] Comment on Networking::Net_SMPP | ||
| References: | 1 2 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-38754@lists.php.net to get a copy of this message | ||
On Tuesday 19 July 2005 03:26 pm, Joshua Eichorn wrote:
> Philippe Jausions wrote:
> >Philippe Jausions (http://pear.php.net/user/jausions) has commented on the
> > proposal for Networking::Net_SMPP.
> >
> >Comment:
> >
> >Beside the class naming issue, I think you should do some benchmarking of
> >the $_defs array vs. a switch() implementation of it.
> >
> >Usually switch it the faster then array creation and if statement. But it
> >may not in your case or it may make things more difficult. The
> >investigation *may* bring performance increase.
> >
> > -Philippe
> >
> >Proposal information:
> >http://pear.php.net/pepr/pepr-proposal-show.php?id=239
>
> In phpDocumentor a switch implementation was always slower then using an
> array to map against functions, but our usage might be different enough
> that it doesn't apply here.
>
FWIW, I think that the current approach is better from an extensibility
viewpoint. New types can easily be added, and the code is smaller and (imo)
more readable/maintainable.
However, this is all internal stuff, and can be easily changed if a problem is
discovered down the road.
Attachment: [application/pgp-signature]
Attachment: [application/pgp-signature]