Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:34384 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 9113 invoked by uid 1010); 4 Jan 2008 00:58:40 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 9098 invoked from network); 4 Jan 2008 00:58:40 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 4 Jan 2008 00:58:40 -0000 Authentication-Results: pb1.pair.com header.from=addw@phcomp.co.uk; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=addw@phcomp.co.uk; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain phcomp.co.uk designates 213.152.38.186 as permitted sender) X-PHP-List-Original-Sender: addw@phcomp.co.uk X-Host-Fingerprint: 213.152.38.186 freshmint.phcomp.co.uk Linux 2.5 (sometimes 2.4) (4) Received: from [213.152.38.186] ([213.152.38.186:62509] helo=mint.phcomp.co.uk) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 88/79-20810-FB48D774 for ; Thu, 03 Jan 2008 19:58:39 -0500 Received: from addw by mint.phcomp.co.uk with local (Exim 4.67) (envelope-from ) id 1JAatD-00012k-7R; Fri, 04 Jan 2008 00:58:23 +0000 Date: Fri, 4 Jan 2008 00:58:23 +0000 To: Sam Barrow Cc: John Coggeshall , Derick Rethans , Stanislav Malyshev , Markus Fischer , "internals@lists.php.net" Message-ID: <20080104005823.GY7861@mint.phcomp.co.uk> References: <200801031903.01980.tomi@cumulo.fi> <1199380881.15292.11.camel@sbarrow-desktop> <20080103172813.GQ7861@mint.phcomp.co.uk> <477D2B40.9010302@fischer.name> <477D2CDB.3000005@zend.com> <1199389948.15292.29.camel@sbarrow-desktop> <12AC15B6-102D-45CD-835C-DA6A14D46065@gmail.com> <1199391277.15292.55.camel@sbarrow-desktop> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1199391277.15292.55.camel@sbarrow-desktop> User-Agent: Mutt/1.4.1i Organization: Parliament Hill Computers Ltd Subject: Re: [PHP-DEV] RE: Optional scalar type hinting From: addw@phcomp.co.uk (Alain Williams) On Thu, Jan 03, 2008 at 03:14:37PM -0500, Sam Barrow wrote: > On Thu, 2008-01-03 at 13:00 -0700, John Coggeshall wrote: > > > Wouldn't this patch also allow for additional performace optimizations > > which would help counter losses even in the non-general case? > > Performance optimizations in what way? I gave an example in another post. Summary: the argument value is check to be (say) numeric on function entry, if it is not numeric but can be converted to a number (eg it is a string of digits) then the convertion is done on function entry. If the value is used several times within the code (presumably as a number) then the type juggle 'string of digits -> number' will not need to be done since it was done on function entry. -- Alain Williams Linux Consultant - Mail systems, Web sites, Networking, Programmer, IT Lecturer. +44 (0) 787 668 0256 http://www.phcomp.co.uk/ Parliament Hill Computers Ltd. Registration Information: http://www.phcomp.co.uk/contact.php Chairman of UKUUG: http://www.ukuug.org/ #include