Re: turning strlen() into an opcode
| From: | Sterling Hughes | Date: | Sat, 09 Nov 2002 01:02:18 +0000 |
| Subject: | Re: turning strlen() into an opcode | ||
| References: | 1 2 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-90683@lists.php.net to get a copy of this message | ||
> On Fri, Nov 08, 2002 at 04:17:43PM -0500, Andrei Zmievski wrote:
>
> > I've made a small patch that turns strlen() into a statement executed by
> > the engine instead of a function. The reasoning is that something that
> > integral should probably be in the engine. I haven't done hard
> > benchmarking but it seems to improve performance of that particular
> > piece of code by about 25%. Feedback is welcome.
>
> I'd be more interested in seeing a more generic len() function (a la
> Python) that would return the length of the variable passed to it (the
> number of characters in a string, then number of elements in an
> array). Actually, I suppose extending count() to handle strings would
> be mostly equivalent.
>
ughh, no more syntatic sugar, php is sweet enough how it is :)
-Sterling
> --
> Jon Parise (jon@php.net) :: The PHP Project (http://www.php.net/)
>
> --
> PHP Development Mailing List <http://www.php.net/>
> To unsubscribe, visit: http://www.php.net/unsub.php
>
--
Sterling Hughes <sterling@bumblebury.com>
Did I help you? Consider a gift: http://wishlist.edwardbear.org/