Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:42730 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 76814 invoked from network); 20 Jan 2009 13:38:37 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 20 Jan 2009 13:38:37 -0000 Authentication-Results: pb1.pair.com header.from=ekneuss@gmail.com; sender-id=pass; domainkeys=bad Authentication-Results: pb1.pair.com smtp.mail=ekneuss@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 72.14.220.155 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.155 fg-out-1718.google.com Received: from [72.14.220.155] ([72.14.220.155:43219] helo=fg-out-1718.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 45/93-57672-AD3D5794 for ; Tue, 20 Jan 2009 08:38:35 -0500 Received: by fg-out-1718.google.com with SMTP id 16so1376570fgg.23 for ; Tue, 20 Jan 2009 05:38:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender :to:subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references :x-google-sender-auth; bh=i/dUmj8v5Ya0Pn8NpKT50r4k9dQ4knxhac7syN+Ia/M=; b=CybSd5eCNcd1CtMs4zDAbRfuC/L9mdBc1D5hqNO2WB9uqZ3ITPS9yO1u4Ckfouvlp1 NNHSHOkjFBsARkigGFsqSdvp4Cz/eyIbSDovM5xuzLP4s8v5UF8BIQxrnITtV5tguHWw CHXW6dVyO93OUbfPak4RDGEnNH+SrBF+sAYhA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references:x-google-sender-auth; b=GctVtRING+lHqYjl9eKy81YS48ieqFt94m9UghSLUF+Ds7C6lrr1h0TgdyD0bMZsTu h7lJsY2H+J+kuYylAmEny0EsLnMQf8T7BaPF/utxJq4zD3DM69MrtPqILnp0l0cVdWT0 byd4g3judRuKRWFIuYrWaeXldLvZ7GL6yLl2k= Received: by 10.86.4.14 with SMTP id 14mr2664100fgd.76.1232458712122; Tue, 20 Jan 2009 05:38:32 -0800 (PST) Received: by 10.86.35.9 with HTTP; Tue, 20 Jan 2009 05:38:32 -0800 (PST) Message-ID: Date: Tue, 20 Jan 2009 14:38:32 +0100 Sender: ekneuss@gmail.com To: "Guilherme Blanco" Cc: "Hannes Magnusson" , "Stan Vassilev | FM" , "internals Mailing List" In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <28434894.20081217221911@marcus-boerger.de> <7f3ed2c30901200441i144e4ddasef7ac57b3e5106eb@mail.gmail.com> X-Google-Sender-Auth: 575f0e7e8afe4553 Subject: Re: [PHP-DEV] New function proposal: spl_object_id From: webmaster@colder.ch ("Etienne Kneuss") 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. Regards, > > Regards, > > On Tue, Jan 20, 2009 at 11:20 AM, Etienne Kneuss wr= ote: >> Hello, >> >> On Tue, Jan 20, 2009 at 1:41 PM, Hannes Magnusson >> wrote: >>> On Tue, Jan 20, 2009 at 13:26, Etienne Kneuss wro= te: >>>> >>>> Could you please provide an example, with code, in which this function >>>> 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 > --=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