Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:42794 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 32517 invoked from network); 23 Jan 2009 01:33:15 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 23 Jan 2009 01:33:15 -0000 Authentication-Results: pb1.pair.com smtp.mail=ekneuss@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=ekneuss@gmail.com; sender-id=pass; domainkeys=bad Received-SPF: pass (pb1.pair.com: domain gmail.com designates 72.14.220.158 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: ekneuss@gmail.com X-Host-Fingerprint: 72.14.220.158 fg-out-1718.google.com Received: from [72.14.220.158] ([72.14.220.158:29435] helo=fg-out-1718.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id EF/A8-15341-95E19794 for ; Thu, 22 Jan 2009 20:33:14 -0500 Received: by fg-out-1718.google.com with SMTP id 16so2175767fgg.23 for ; Thu, 22 Jan 2009 17:33:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to:cc :content-type:content-transfer-encoding; bh=VIvCP+He6YqpKToVo4SH18JK/FKk54w0w5oxuRBGZ58=; b=Vp4+Gm4TEAsEb7csqmwbOl6bs6x7i0Bb+mrwRUrkdxWzQLNx01Yb72qy3U8Vjl7747 lpI90bIOWTPuUEpcDbz6dDxMIj+hQ8oQcWhZQR0OOMFmeTc+/0kTlDI4FhTp/85MwkXy Nw+DHRevzvxOurtRLz1AoliX5OTok3SCNqIOQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=cZF7K12f8iPjXBvq/lQZjFI/amHAFjS8VotXqb9dzwTwfpBg3AbGyqyJCGQym6hBXs 7FHLAh9M0OPWMYs3VylMRT74QCbrBiO7Hyp5hC+JqmlK05MF5EJCQcypcJzVStmKYywH hjVx/tXcBEw3B4rtABfuEUup966X49gxPVfkU= MIME-Version: 1.0 Sender: ekneuss@gmail.com Received: by 10.86.79.4 with SMTP id c4mr48942fgb.7.1232674390286; Thu, 22 Jan 2009 17:33:10 -0800 (PST) In-Reply-To: References: <28434894.20081217221911@marcus-boerger.de> <7f3ed2c30901200441i144e4ddasef7ac57b3e5106eb@mail.gmail.com> Date: Fri, 23 Jan 2009 02:33:10 +0100 X-Google-Sender-Auth: dfc5d231e7845631 Message-ID: To: Guilherme Blanco Cc: Hannes Magnusson , "Stan Vassilev | FM" , internals Mailing List Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] New function proposal: spl_object_id From: webmaster@colder.ch (Etienne Kneuss) Hello, On Tue, Jan 20, 2009 at 2:38 PM, Etienne Kneuss wrote= : > Hello, > > On Tue, Jan 20, 2009 at 2:23 PM, Guilherme Blanco > wrote: >> Etienne, >> >> We all already considered to not implement spl_object_id as long as >> spl_object_hash is optimized. > > Ok then, I'll provide a patch to improve spl_object_hash's > performance, which will also change it's output. > Documentation will also need to be updated so that people are aware > that most of the time SplObjectStorage will be a better alternative. > Here is the mentioned patches: http://patches.colder.ch/php-src/spl_object_hash-5_3.patch?markup http://patches.colder.ch/php-src/spl_object_hash-HEAD.patch?markup If nobody objects, I'll commit them Sunday. Regards, > Regards, > >> >> Regards, >> >> On Tue, Jan 20, 2009 at 11:20 AM, Etienne Kneuss w= rote: >>> Hello, >>> >>> On Tue, Jan 20, 2009 at 1:41 PM, Hannes Magnusson >>> wrote: >>>> On Tue, Jan 20, 2009 at 13:26, Etienne Kneuss wr= ote: >>>>> >>>>> Could you please provide an example, with code, in which this functio= n >>>>> would be necessary ? (i.e. where you can't use SplObjeccctStorage) >>>> >>>> Why? >>>> >>>> As far as i understand, the issue is that spl_object_hash() is slow >>>> and people want a faster alternatives. >>>> Although the initial reason for the faster alternative was to do >>>> maintain some classmap for a "random" PHP project, this has nothing to >>>> do with the fact spl_object_hash() is slow, especially compared to the >>>> proposed spl_object_id() function. >>> >>> People that need a faster alternative usually need it to have an >>> efficient object hash map. So far all the use cases where a faster >>> spl_object_hash was needed is to do exactly that. Since this is >>> already possible, the need for spl_object_id is questionable. If there >>> is a clear need for it, I'll be happy to implement it myself. >>> >>>> >>>> Now, your "workarounds" using SplObjectStorage may work for the >>>> previous mentioned usecases - but how the frick is anyone supposed >>>> know to know about the wonders of SplObjectStorage? >>>> The doxygen is very confusing and definetly does not replace real >>>> documentation - plus it doesn't mention the things you are referring >>>> too (object =3D> data map) or any of the other 5.3 features. >>> >>> So, since documentation is currently bad, we should implement some >>> additional functions to do the same? >>> Sorry, but your SPL documentation vendetta is irrelevant to the >>> question at hand. >>> >>>> >>>> -Hannes >>>> >>>> >>>> >>> >>> >>> >>> -- >>> Etienne Kneuss >>> http://www.colder.ch >>> >>> Men never do evil so completely and cheerfully as >>> when they do it from a religious conviction. >>> -- Pascal >>> >>> -- >>> PHP Internals - PHP Runtime Development Mailing List >>> To unsubscribe, visit: http://www.php.net/unsub.php >>> >>> >> >> >> >> -- >> Guilherme Blanco - Web Developer >> CBC - Certified Bindows Consultant >> Cell Phone: +55 (16) 9215-8480 >> MSN: guilhermeblanco@hotmail.com >> URL: http://blog.bisna.com >> S=E3o Paulo - SP/Brazil >> > > > > -- > Etienne Kneuss > http://www.colder.ch > > Men never do evil so completely and cheerfully as > when they do it from a religious conviction. > -- Pascal > --=20 Etienne Kneuss http://www.colder.ch Men never do evil so completely and cheerfully as when they do it from a religious conviction. -- Pascal