Re: RE: [RFC] Fast Parameter Parsing API

From: Date: Tue, 27 May 2014 15:58:49 +0000
Subject: Re: RE: [RFC] Fast Parameter Parsing API
References: 1 2 3 4 5 6 7 8 9 10 11 12 13 14  Groups: php.internals 
Request: Send a blank email to internals+get-74529@lists.php.net to get a copy of this message
On 27 May 2014, at 03:56, Stas Malyshev <smalyshev@sugarcrm.com> wrote: > That's what I was talking about when I was mentioning function pointers, > but then we'll still have a loop with a bunch of function calls instead > of an unrolled loop like the current proposal does. Which is more > expensive since the execution flow has to jump back and forth… Well, we already have an unrolling system, with the proposed Z_PARAM_* macros. Maybe we could do this in the function body? ZEND_PARSE_PARAMETERS(Z_PARAM(input) Z_PARAM(offset) Z_PARAM(z_length) Z_PARAM(preserve_keys), { return; }) Now no type information is repeated but the loop is still unrolled. If we were using C99 we could use recursive variadic macros and make it nicer, but sadly we’re not using C99. Also, although unrolled, it would have to do function pointers or what have you to fetch the right type information. :/ -- Andrea Faulds http://ajf.me/

« previous php.internals (#74529) next »