Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:41472 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 80546 invoked from network); 27 Oct 2008 17:49:48 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 27 Oct 2008 17:49:48 -0000 Authentication-Results: pb1.pair.com header.from=phpwnd@gmail.com; sender-id=pass; domainkeys=bad Authentication-Results: pb1.pair.com smtp.mail=phpwnd@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.200.172 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: phpwnd@gmail.com X-Host-Fingerprint: 209.85.200.172 wf-out-1314.google.com Received: from [209.85.200.172] ([209.85.200.172:2841] helo=wf-out-1314.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 6F/35-34199-B3FF5094 for ; Mon, 27 Oct 2008 12:49:48 -0500 Received: by wf-out-1314.google.com with SMTP id 26so2178688wfd.26 for ; Mon, 27 Oct 2008 10:49:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=q+GUaFBjt7eyHCEMIJm+9gHvgBUr6Bx79h4E94rDQm8=; b=iWgH1OOS17jx0pr4P/5ikxQYenh6GmO+EU0vhFkLqC6fcr8nvAhDs5hi/OyHpmcWNk asmKY0+v5AP/cNWesywqM4j9HI0GwxnsgH09IgQO5c6SIWcEi5NfJ+lHhy6CP8coXhxq ruDv/rhULVkUpbnZaHmaLVhkWi3JywHOs0QpU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=LZwjiDGHS3EDYgjHAVCf1proHD9MfKKBBB0XquMMFRFhXEVKcqXMgHOGQSbGsb+UoA Sx/9ugXXnLKLIzaWugPKMR1stSFk03U0mbxyx7UO69lxHE27Jyrk+hcrRENZ3siQWvQA wbd9yX13wjbWLpGeZeD8R9A9hWw99LTDb5ieI= Received: by 10.140.140.3 with SMTP id n3mr3390184rvd.299.1225129785101; Mon, 27 Oct 2008 10:49:45 -0700 (PDT) Received: by 10.141.83.21 with HTTP; Mon, 27 Oct 2008 10:49:45 -0700 (PDT) Message-ID: <11c607a60810271049y419c252q7e21cde9221f1996@mail.gmail.com> Date: Mon, 27 Oct 2008 18:49:45 +0100 To: "Rodrigo Saboya" Cc: internals@lists.php.net In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <49048EC1.9060908@chiaraquartet.net> <4904CE3B.2000001@chiaraquartet.net> <4905EDA9.9050301@zend.com> Subject: Re: [PHP-DEV] namespace separator and whining From: phpwnd@gmail.com ("Josh Davis") 2008/10/27 Rodrigo Saboya : > I agree with Stas. It's better to force people to actually reference their > classes/functions/constants correctly and get better performance than > getting unclear slowdowns. If I'm not mistaken, you only experience any noticeable slowdown if all of these conditions are met: - you use an internal class many, many times (as the overhead from a handful of invocations would be negligible) - you do implement __autoload(), that __autoload() accesses the filesystem and the result is not cached (isn't there a stat cache?) or that __autoload() performs some kind of computation-intensive operation - you didn't reference the class using the global namespace (IOW, "new PDO" instead of "new \PDO") I'd expect people who execute that kind of code and care about performance to know that referencing internal classes in the correct namespace is more efficient. People who don't know the difference are likely to run worse code than that anyway (eg LIKE '%foo%' queries, in_array() in a loop, and other common mistakes). Perhaps the performance argument would have more weight if somebody benchmarked the impact on an average application? -JD