Return-Path: Delivered-To: apmail-perl-dev-archive@www.apache.org Received: (qmail 97272 invoked from network); 22 Aug 2005 17:44:43 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 22 Aug 2005 17:44:43 -0000 Received: (qmail 45192 invoked by uid 500); 22 Aug 2005 17:44:42 -0000 Delivered-To: apmail-perl-dev-archive@perl.apache.org Received: (qmail 45183 invoked by uid 500); 22 Aug 2005 17:44:42 -0000 Mailing-List: contact dev-help@perl.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list dev@perl.apache.org Received: (qmail 45170 invoked by uid 99); 22 Aug 2005 17:44:42 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 22 Aug 2005 10:44:42 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of gozer@ectoplasm.org designates 66.34.202.202 as permitted sender) Received: from [66.34.202.202] (HELO minerva.ectoplasm.org) (66.34.202.202) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 22 Aug 2005 10:44:59 -0700 Received: from minerva.ectoplasm.org (localhost.localdomain [127.0.0.1]) by pmx.secure.ectoplasm.org (Postfix) with SMTP id 19F245EB32; Mon, 22 Aug 2005 10:44:40 -0700 (PDT) Received: from [192.168.10.200] (unknown [192.168.10.200]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by minerva.ectoplasm.org (Postfix) with ESMTP id 850475EB1E; Mon, 22 Aug 2005 10:44:39 -0700 (PDT) Message-ID: <430A0F06.6040303@ectoplasm.org> Date: Mon, 22 Aug 2005 10:44:38 -0700 From: "Philippe M. Chiasson" User-Agent: Mozilla Thunderbird 1.0.6-1.1.fc4 (X11/20050720) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Geoffrey Young CC: "Philip M. Gollucci" , dev@perl.apache.org Subject: Re: [PATCH] Apache2::Reload References: <430845DA.6060209@p6m7g8.com> <4309F922.3020500@modperlcookbook.org> In-Reply-To: <4309F922.3020500@modperlcookbook.org> X-Enigmail-Version: 0.91.0.0 Content-Type: multipart/signed; micalg=pgp-ripemd160; protocol="application/pgp-signature"; boundary="------------enigE6B2CDAB1B094C55C85D6697" X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N --------------enigE6B2CDAB1B094C55C85D6697 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Geoffrey Young wrote: >>- while (my($key, $file) = each %Apache2::Reload::INCS) { >>+ foreach my $key (sort { $a cmp $b } keys %Apache2::Reload::INCS) { >>+ my $file = $Apache2::Reload::INCS{$key}; > > I hate each. each is perfect when iterating over a large hash and not caring about ordering. Doesn't need to build a large array to hold _all_ the keys, so it's a major speed improvement. I am not sure what is gained here by sorting ? -------------------------------------------------------------------------------- Philippe M. Chiasson m/gozer\@(apache|cpan|ectoplasm)\.org/ GPG KeyID : 88C3A5A5 http://gozer.ectoplasm.org/ F9BF E0C2 480E 7680 1AE5 3631 CB32 A107 88C3A5A5 --------------enigE6B2CDAB1B094C55C85D6697 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (GNU/Linux) Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org iD8DBQFDCg8GyzKhB4jDpaURA2cxAJ46Ms6IUeePq6cJ/cirMNHdP8CtaACfX8rw B6ZkO/trhGFRwba4A5xDX/s= =KwgD -----END PGP SIGNATURE----- --------------enigE6B2CDAB1B094C55C85D6697--