Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:26479 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 64184 invoked by uid 1010); 10 Nov 2006 18:14:07 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 64169 invoked from network); 10 Nov 2006 18:14:07 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 10 Nov 2006 18:14:07 -0000 Authentication-Results: pb1.pair.com smtp.mail=iliaal@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=iliaal@gmail.com; sender-id=pass; domainkeys=good Received-SPF: pass (pb1.pair.com: domain gmail.com designates 64.233.184.235 as permitted sender) DomainKey-Status: good X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: iliaal@gmail.com X-Host-Fingerprint: 64.233.184.235 wr-out-0506.google.com Linux 2.4/2.6 Received: from [64.233.184.235] ([64.233.184.235:1482] helo=wr-out-0506.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 2B/94-27611-C61C4554 for ; Fri, 10 Nov 2006 13:14:06 -0500 Received: by wr-out-0506.google.com with SMTP id 58so364280wri for ; Fri, 10 Nov 2006 10:14:02 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:in-reply-to:references:mime-version:content-type:message-id:cc:content-transfer-encoding:from:subject:date:to:x-mailer:sender; b=WB/wq7zYd0tNkgqKR/+mMVc/g0dSj64Ef17UddWCV3n86+hWKulSWo4m8sWAAqQNyANKl8TD//QD4cCZtffDPsRcn2NzZN9FwGaMqNkAIrd/UKMv/L38Ap8Gw+6zKAuNPKrA8itTiEXv9wvPWYwH9636euG3LqPvQfI9xxHVXQY= Received: by 10.65.224.11 with SMTP id b11mr2711190qbr.1163182442054; Fri, 10 Nov 2006 10:14:02 -0800 (PST) Received: from ?192.168.1.6? ( [74.108.69.82]) by mx.google.com with ESMTP id f17sm2460780qba.2006.11.10.10.14.01; Fri, 10 Nov 2006 10:14:01 -0800 (PST) In-Reply-To: References: <4554AE0D.4080600@caedmon.net> Mime-Version: 1.0 (Apple Message framework v752.3) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-ID: Cc: internals@lists.php.net Content-Transfer-Encoding: 7bit Date: Fri, 10 Nov 2006 13:13:52 -0500 To: Sebastian Bergmann X-Mailer: Apple Mail (2.752.3) Sender: Ilia Alshanetsky Subject: Re: [PHP-DEV] Namespaces in PHP 6 - ++$take From: ilia@prohost.org (Ilia Alshanetsky) On 10-Nov-06, at 12:54 PM, Sebastian Bergmann wrote: > Ilia Alshanetsky wrote: >> If anything it'll make code complex and intertwined, introduce >> serious >> scope issue most people have not had to consider up until now and so >> on. It will without a doubt increase language complexity as well, >> which >> generally translates to a loss in performance. > > Am I right to assume that both scoping and performance issues only > come > up if we were to implement an import() mechanism? If so, do we really > need import? > > If not, then > > namespace foo > { > class bar > { > } > } > > would be "mangled" at compile-time into foo\bar and should not impose > any performance penalty or scoping issues. As your key size increases the slower the key hash generation process becomes, if you look at the PHP's hash key generation code you'll see that it works best for 8 or less chars, anything longer and the performance starts to drop. Add to this case-sensitivity issues and you have an additional draw on your speed. Obviously, by doing things at compile time you reduce overhead, so it is a good idea, but it will not eliminate the performance penalties, it'll probable halve them however. Ilia Alshanetsky