Newsgroups: php.internals,php.internals.win Path: news.php.net Xref: news.php.net php.internals:89301 php.internals.win:1128 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 81835 invoked from network); 23 Nov 2015 01:28:06 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 23 Nov 2015 01:28:06 -0000 Authentication-Results: pb1.pair.com smtp.mail=php_lists@realplain.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=php_lists@realplain.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain realplain.com from 68.114.190.31 cause and error) X-PHP-List-Original-Sender: php_lists@realplain.com X-Host-Fingerprint: 68.114.190.31 mtaout006-public.msg.strl.va.charter.net Received: from [68.114.190.31] ([68.114.190.31:23560] helo=mtaout006-public.msg.strl.va.charter.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 20/20-12874-3AB62565 for ; Sun, 22 Nov 2015 20:28:04 -0500 Received: from impout005 ([68.114.189.20]) by mtaout006.msg.strl.va.charter.net (InterMail vM.9.00.021.00 201-2473-182) with ESMTP id <20151123012801.IPGN28537.mtaout006.msg.strl.va.charter.net@impout005>; Sun, 22 Nov 2015 19:28:01 -0600 Received: from pc1 ([97.87.188.16]) by impout005 with charter.net id kpU01r00D0Mfu3D01pU05P; Sun, 22 Nov 2015 19:28:01 -0600 X-Authority-Analysis: v=2.1 cv=S7lXwecP c=1 sm=1 tr=0 a=Ay788ph35uAhBIV2K373vw==:117 a=Ay788ph35uAhBIV2K373vw==:17 a=hOpmn2quAAAA:8 a=BCPeO_TGAAAA:8 a=8nJEP1OIZ-IA:10 a=uPZiAMpXAAAA:8 a=bffCWaHK3tWuYRNW5g0A:9 a=wPNLvfGTeEIA:10 Message-ID: To: , Cc: "Dmitry Stogov" , "Anatol Belski" , "Pierre Joye" , "Matt Tait" , "Nikita Popov" References: <9B23C6783EE5480CB15EAC35B9E420EA@pc1> Date: Sun, 22 Nov 2015 19:28:00 -0600 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=response 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] Windows (Visual Studio) compiler stuff From: php_lists@realplain.com ("Matt Wilmas") Hi Anatol, Dmitry, all, Will reply about the original subject issues soon, but this is about new stuff I noticed the other day... Adding Matt Tait and Nikita because of PR #1418 and comments. Anyway, the new Control Flow Guard (/guard:cf) is causing a big slowdown on bench.php. :-( 14% on a Yorkfield (Q9400) and 19% on a Sandy Bridge (Celeron G530). Ouch. Did anyone else check the performance impact? Is this acceptable? On any other platform...? I'll definitely remove that from my builds (Elephpant Sanctuary, coming soon) since it's useless on all but the latest Windows versions anyway. But if that "feature" must remain enabled otherwise, I think we can eliminate most of the performance hit. As Nikita wondered about, I first wanted to look at the indirect calls to the opcode handlers. I tried separating out zend_execute.c in the Makefile and added /guard:cf- Bingo! That restored about 98% of the speed on bench.php. It reduced the --disable-all NTS DLL by 13.5 KB (of the 67 KB added by full CFG). Or could maybe change back to the old SWITCH executor? I didn't try that. It seems like it would be a good "rule" to not use any MS stuff that isn't done on other compilers/platforms. :-) /GS [1] is another that is/was starting to get annoying (function prolog/epilog); luckily I was able to suppress it in most cases with changes I'm making. It's enabled by default, of course, although I see it's commented out in a line (old?) of confutils.js. /GS- ;-) I really hope there aren't places where we are not doing range checks, etc. ourselves (that the compiler can't see). So, either /GS is a waste, or it's only a matter of time with other compilers?! [1] http://stackoverflow.com/questions/6607410/understanding-buffer-security-check-gs-compiler-option-in-msvc - Matt