RE: [PHP-DEV] [RFC] Fast Parameter Parsing API
| From: | Zeev Suraski | Date: | Wed, 28 May 2014 12:24:40 +0000 |
| Subject: | RE: [PHP-DEV] [RFC] Fast Parameter Parsing API | ||
| References: | 1 2 3 4 5 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-74565@lists.php.net to get a copy of this message | ||
Are there specific functions you think we should use it that could give us
a 80/20 gain?
I didn’t think of it as an optimization we’d only use in ‘sensitive’
functions, but about wholesale migration from the current APIs to new ones.
Zeev
*From:* Dmitry Stogov [mailto:dmitry@zend.com]
*Sent:* Wednesday, May 28, 2014 3:13 PM
*To:* Derick Rethans
*Cc:* Johannes Schlüter; Andrea Faulds; PHP Internals; Bob Weinand; Stas
Malyshev; Zeev Suraski; Xinchen Hui; Andi Gutmans; Nikita Popov
*Subject:* Re: [PHP-DEV] [RFC] Fast Parameter Parsing API
This API was designed to solve the existing bottleneck (5% CPU time lose).
It's not proposed to be used in all functions, only in few really affected.
Anyone may have their own opinion about readability (someones like Perl,
others Ada).
I appeal to think not about subjective readability, but about the cost of
ownership for @internals and PHP users.
Thanks. Dmitry.
On Wed, May 28, 2014 at 3:49 PM, Derick Rethans <derick@php.net> wrote:
On Fri, 23 May 2014, Johannes Schlüter wrote:
> On Fri, 2014-05-23 at 13:52 +0100, Andrea Faulds wrote:
> > On 23 May 2014, at 12:36, Dmitry Stogov <dmitry@zend.com> wrote:
> >
> > > Please take a look at u!
> > > Äà 7IdŸ€�Àehttps://wiki.php.net/rfc/fast_zpp
> > >
> > > Thanks. Dmitry.
> >
> > This looks like a great idea. I like how it’s not only faster, but
> > it seems to be more readable.
>
> More readable? - I feel exactly the opposite. Yes, we get rid of void
> pointers but use a pattern easy to understand. This looks like macro
> hell.
I don't find it more readable either. From a single line, it goes to 7,
and what if there are three different zpp calls (like in
https://github.com/php/php-src/blob/master/ext/date/php_date.c#L4393)
?
I know the old API is not going away, but I'm not just sure about this
one...
> If we break APIs anyways: Can't we go for C++ which allows providing
> high level APIs with high performance ...
no :-)
cheers,
Derick
--
http://derickrethans.nl | http://xdebug.org
Like Xdebug? Consider a donation: http://xdebug.org/donate.php
twitter: @derickr and @xdebug
Posted with an email client that doesn't mangle email: alpine