Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:74529 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 43710 invoked from network); 27 May 2014 15:59:02 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 27 May 2014 15:59:02 -0000 Authentication-Results: pb1.pair.com smtp.mail=ajf@ajf.me; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=ajf@ajf.me; sender-id=pass Received-SPF: pass (pb1.pair.com: domain ajf.me designates 192.64.116.196 as permitted sender) X-PHP-List-Original-Sender: ajf@ajf.me X-Host-Fingerprint: 192.64.116.196 imap4.ox.privateemail.com Received: from [192.64.116.196] ([192.64.116.196:55908] helo=imap4.ox.privateemail.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id C5/74-18053-546B4835 for ; Tue, 27 May 2014 11:59:02 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.privateemail.com (Postfix) with ESMTP id 951F2560088; Tue, 27 May 2014 11:58:58 -0400 (EDT) X-Virus-Scanned: Debian amavisd-new at imap4.ox.privateemail.com Received: from mail.privateemail.com ([127.0.0.1]) by localhost (imap4.ox.privateemail.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 504N1BDauyHL; Tue, 27 May 2014 11:58:58 -0400 (EDT) Received: from [192.168.0.200] (unknown [90.203.28.11]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mail.privateemail.com (Postfix) with ESMTPSA id 29C81560087; Tue, 27 May 2014 11:58:52 -0400 (EDT) Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.2\)) In-Reply-To: <5383FEF3.3070309@sugarcrm.com> Date: Tue, 27 May 2014 16:58:49 +0100 Cc: Xinchen Hui , Pierre Joye , Bob Weinand , Dmitry Stogov , Zeev Suraski , PHP Internals , Andi Gutmans , Nikita Popov Content-Transfer-Encoding: quoted-printable Message-ID: References: <-6285448086228171932@unknownmsgid> <67d97efff27b61e45ef74d4f4339b4b3@mail.gmail.com> <962B3020-200F-45D2-8FEC-AD7A0BFDA50E@ajf.me> <5383F329.3050106@sugarcrm.com> <5383FEF3.3070309@sugarcrm.com> To: Stas Malyshev X-Mailer: Apple Mail (2.1878.2) Subject: Re: [PHP-DEV] RE: [RFC] Fast Parameter Parsing API From: ajf@ajf.me (Andrea Faulds) On 27 May 2014, at 03:56, Stas Malyshev 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=85 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=92re 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/