Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:87661 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 46099 invoked from network); 6 Aug 2015 06:49:03 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 6 Aug 2015 06:49:03 -0000 Authentication-Results: pb1.pair.com header.from=php_lists@realplain.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=php_lists@realplain.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain realplain.com from 216.33.127.80 cause and error) X-PHP-List-Original-Sender: php_lists@realplain.com X-Host-Fingerprint: 216.33.127.80 mta11.charter.net Solaris 10 1203 Received: from [216.33.127.80] ([216.33.127.80:46818] helo=mta11.charter.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 07/92-22467-E5303C55 for ; Thu, 06 Aug 2015 02:49:03 -0400 Received: from imp11 ([10.20.200.11]) by mta11.charter.net (InterMail vM.8.01.05.09 201-2260-151-124-20120717) with ESMTP id <20150806064859.DBDB5815.mta11.charter.net@imp11>; Thu, 6 Aug 2015 02:48:59 -0400 Received: from mtaout002.msg.strl.va.charter.net ([68.114.190.27]) by imp11 with smtp.charter.net id 1Joz1r0030buw5Q05JozuK; Thu, 06 Aug 2015 02:48:59 -0400 Received: from impout005 ([68.114.189.20]) by mtaout002.msg.strl.va.charter.net (InterMail vM.9.00.020.01 201-2473-160) with ESMTP id <20150806064859.SLDY2337.mtaout002.msg.strl.va.charter.net@impout005>; Thu, 6 Aug 2015 01:48:59 -0500 Received: from pc1 ([96.35.251.86]) by impout005 with charter.net id 1Joy1r00M1sc0so01Joytm; Thu, 06 Aug 2015 01:48:59 -0500 X-Authority-Analysis: v=2.1 cv=NdNo1gz4 c=1 sm=1 tr=0 a=Is5gsZaFXO8aPum+t7Tz+g==:117 a=Is5gsZaFXO8aPum+t7Tz+g==:17 a=hOpmn2quAAAA:8 a=BCPeO_TGAAAA:8 a=N659UExz7-8A:10 a=Yw8KounhTkdsZO-5DToA:9 a=pILNOxqGKmIA:10 Message-ID: To: "Levi Morrison" Cc: "Dmitry Stogov" , "PHP Internals" , "Ferenc Kovacs" , "Yasuo Ohgaki" References: <051CB45EE4B24C7C88C3EABC7E8EE0A2@pc1><77CE51405C92499BA13CE0913883EE05@pc1> Date: Thu, 6 Aug 2015 01:48:50 -0500 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="Windows-1252"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.5931 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 Subject: Re: [PHP-DEV] Move to Fast ZPP? From: php_lists@realplain.com ("Matt Wilmas") 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.) Thanks, Matt