Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:87662 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 47858 invoked from network); 6 Aug 2015 06:59:22 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 6 Aug 2015 06:59:22 -0000 Authentication-Results: pb1.pair.com smtp.mail=pierre.php@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=pierre.php@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.215.48 as permitted sender) X-PHP-List-Original-Sender: pierre.php@gmail.com X-Host-Fingerprint: 209.85.215.48 mail-la0-f48.google.com Received: from [209.85.215.48] ([209.85.215.48:34447] helo=mail-la0-f48.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 81/F2-22467-9C503C55 for ; Thu, 06 Aug 2015 02:59:22 -0400 Received: by labow3 with SMTP id ow3so43249024lab.1 for ; Wed, 05 Aug 2015 23:59:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=XrIICwZzV6yv4QU5qgqoOk16gdei5UXV1e04zuPzqsU=; b=Sn1PKmVjIlVu0+Wv9pITQjC4pntmtHKwdBvqx8vNxRncFTUCSl9A1GCfacaNldfWl/ OSwZK14bNJOeEZb+y/pgtbbqiDPG1ceMxmlYUWsFVm5iOKyApQeYUAjuiXSJ5Pm4rCUW 5hocLfYAv+3udNpkQ4w2MWqtTeWObmfm3yZufyc2jgrq8dAFYe3mSxTWu7wijlsZTj8j hf7QjDwgL3pxTNS6ODmMutMgteoVJepefagRClwc3QjZ3Q9m90jRmB3n+qcoWoUr2zDP AN9XqD+gmqV1P3RAEg5wUf9gQEfeC0MNnOUOwBBk2buguzf12z81pZaGjexqmlikws7Z iSOQ== MIME-Version: 1.0 X-Received: by 10.152.27.134 with SMTP id t6mr131271lag.100.1438844358641; Wed, 05 Aug 2015 23:59:18 -0700 (PDT) Received: by 10.112.33.7 with HTTP; Wed, 5 Aug 2015 23:59:18 -0700 (PDT) Received: by 10.112.33.7 with HTTP; Wed, 5 Aug 2015 23:59:18 -0700 (PDT) In-Reply-To: References: <051CB45EE4B24C7C88C3EABC7E8EE0A2@pc1> <77CE51405C92499BA13CE0913883EE05@pc1> Date: Thu, 6 Aug 2015 13:59:18 +0700 Message-ID: To: Matt W Cc: Yasuo Ohgaki , Ferenc Kovacs , PHP Internals , Dmitry Stogov , Levi Morrison Content-Type: multipart/alternative; boundary=089e0160bf68e24d8e051c9f0eb7 Subject: Re: [PHP-DEV] Move to Fast ZPP? From: pierre.php@gmail.com (Pierre Joye) --089e0160bf68e24d8e051c9f0eb7 Content-Type: text/plain; charset=UTF-8 On Aug 6, 2015 1:49 PM, "Matt Wilmas" wrote: > > Hi Levi, > > > ----- Original Message ----- > From: "Levi Morrison" > Sent: Thursday, August 06, 2015 > >>> Don't know about Windows now... Visual Studio 2008 and 2012 (not much >>> difference) are NOT optimizing away the code (other times it was GCC with >>> issues). :-/ Not sure why. Of course they don't support the necessary >>> compound literals anyway, but I was just testing a manual case... I'll have >>> to try and check 2015 version soon. >> >> >> VS 2015 supports compound literals, I believe. > > > Yes, VS 2013 added, AFAIK. But I was just talking about optimizing the code that would use them. A compound literal (void *[]), derived from variadic macro, is needed to transform zend_parse_parameters() into a non-varargs inline function call (since va_arg usage prevents inlining). > > The problem in the earlier VS versions, which I simulated manually without compound literals, is that it doesn't want to optimize away all the inlined stuff, leaving only the result. Definitely can't have something creating several KB of extra instructions! :-) > > So unless they improved something in the newest versions, this wouldn't be able to be used there, unless I can work around it somehow. I don't know if macros, instead of inline functions, inside the main inline function would help or not... > > Although, it *would* simplify a couple tiny parts if didn't need to support MSVC... First, detecting a string *literal* (99% of usage): could just use __builtin_constant_p() instead of a macro trick. > > And second, using a variable length array, with size set by, well, a variable, which I think VS still doesn't support from C99, right? (It's for a "variable" in this case, but always the same, so should optimize like a compile-time size.) If you have a piece of self contained code to test it, we can then add it to the VC test repo to valid what we can support with 7+. --089e0160bf68e24d8e051c9f0eb7--