RE: [RFC] Fast Parameter Parsing API
| From: | Zeev Suraski | Date: | Mon, 26 May 2014 07:17:32 +0000 |
| Subject: | RE: [RFC] Fast Parameter Parsing API | ||
| References: | 1 2 3 4 5 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-74482@lists.php.net to get a copy of this message | ||
I think the main challenge is the fact it turns what today is a one-liner
(albeit a bit obscure) into a long multi-line all-caps gig. I’ve tried to
think about alternatives but so far came short with something that
elegantly solves the problem, short of using C++ which I think goes too far
in the context of what we’re trying to achieve.
I’ll do some more thinking…
Zeev
*From:* Dmitry Stogov [mailto:dmitry@zend.com]
*Sent:* Monday, May 26, 2014 10:10 AM
*To:* Zeev Suraski
*Cc:* Xinchen Hui; PHP Internals; Bob Weinand; Stas Malyshev; Andi Gutmans;
Nikita Popov
*Subject:* Re: [RFC] Fast Parameter Parsing API
I personally see it more readable than "sZ|l", but of course, other people
may think differently.
I would be glad if someone would propose something useful in reasonable
time.
Thanks. Dmitry.
On Mon, May 26, 2014 at 11:01 AM, Zeev Suraski <zeev@zend.com> wrote:
To be perfectly honest, I tend to agree that the readability issues with
this proposal make it a bit difficult to digest. And I'm not taking a 2.5%
real world performance gain lightly - it's huge.
I think we need to consider other alternatives as code readability and
maintainability are important factors to consider, not just performance...
Zeev
On 26 במאי 2014, at 08:39, Dmitry Stogov <dmitry@zend.com> wrote:
I would be glad to see proposals from Hannes and Johannes, but we also need
to move phpng forward, and I wouldn't like to spend on this too much time.
Our proposal is mainly about speed (as well as the main phpng goal).
We identified yet another bottleneck and eliminated it.
Changes in readability and compile-time type checking are side effects of
implementation.
Thanks. Dmitry.
On Sat, May 24, 2014 at 4:50 PM, Xinchen Hui <xinchen.h@zend.com> wrote:
Hey:
On Fri, May 23, 2014 at 7:36 PM, Dmitry Stogov <dmitry@zend.com> wrote:
> Please take a look at https://wiki.php.net/rfc/fast_zpp
It's really a great improvement.
zend_parse_parameters is too heavy, and to me:
Z_PARAM_STR() is obviously readable than
zend_parse_parameter("s" /* what the hell s means here? */,)
and the performance gain is also very significant ..
actually, I thought about somethings like that.. but this patch
is better...
and these new APIs didn't break any APIS, just provides a more
fast choice...
I really don't understand why you guys think it not good?
thanks
>
> Thanks. Dmitry.
--
Xinchen Hui Laruence
Consultant at Zend
http://www.laruence.com/