Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:79047 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 10698 invoked from network); 20 Nov 2014 18:43:39 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 20 Nov 2014 18:43:39 -0000 Authentication-Results: pb1.pair.com smtp.mail=smalyshev@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=smalyshev@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.192.172 as permitted sender) X-PHP-List-Original-Sender: smalyshev@gmail.com X-Host-Fingerprint: 209.85.192.172 mail-pd0-f172.google.com Received: from [209.85.192.172] ([209.85.192.172:37290] helo=mail-pd0-f172.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id E4/70-07686-A563E645 for ; Thu, 20 Nov 2014 13:43:39 -0500 Received: by mail-pd0-f172.google.com with SMTP id v10so3603850pde.3 for ; Thu, 20 Nov 2014 10:43:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=IgY6DIFmn2ChpqHEcF0oq8C/PZMYztHlKGPVBRVblPk=; b=ekmx45WoOpDEe+6v8glNfibQHOfdZqakwEBRtLlVuQOAAzhkrRNdnyNF2Z7E7UXy7O K16tUY72G8BzDwXppGKKdEO2pbuMeSDcZtcXvPgm3TpTU0YDaEXRwcxI7u1/GcJj9exN ddFZcBZQcydGDIjC/x/RDJSrAsLxYeqggHo/+WKipAmTlHSPsWgFMBOLla+CqGYXvXlG MFlSxlTa0SrmFdLU7GCjKKUJeytqOaHma8tC4S+FuJrY+Lh6TRW1R/dFNNjQkPkDWIUx VpnJZTPg+hFwVyUlFgP6GNQDLOy5L6Tnqv6rvTAwQY7Wy+zUTjESL9U3Wx7DpTVHDs/8 Yu/Q== X-Received: by 10.70.53.102 with SMTP id a6mr48798186pdp.70.1416509016234; Thu, 20 Nov 2014 10:43:36 -0800 (PST) Received: from stas-air.corp.wikimedia.org (tan4.corp.wikimedia.org. [198.73.209.4]) by mx.google.com with ESMTPSA id td4sm2690186pbc.36.2014.11.20.10.43.35 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 20 Nov 2014 10:43:35 -0800 (PST) Message-ID: <546E3656.2010608@gmail.com> Date: Thu, 20 Nov 2014 10:43:34 -0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: Dmitry Stogov CC: PHP Internals References: <546B0F62.1090705@gmail.com> In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] [RFC] Default constructors From: smalyshev@gmail.com (Stanislav Malyshev) Hi! > I think the idea is good. > I'm not sure about implementation. > Additional check for ZEND_NULL_FUNCTION in DO_FCALL may be expensive. > I think it must be better to use special predefined function (see > "zend_pass_function" usage in zend_vm_def.h). I've moved the condition after internal & user function, so the slowdown would almost never happen and will be very minimal. But if you prefer, I can do the other one, I actually implemented it first with the function but then removed it since I thought ability to skip a function call may be faster and also prove useful in other cases. I'll try to do another version with zend_pass_function and see if I see any difference. -- Stas Malyshev smalyshev@gmail.com