Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:42727 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 71522 invoked from network); 20 Jan 2009 13:20:37 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 20 Jan 2009 13:20: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.153 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.153 fg-out-1718.google.com Received: from [72.14.220.153] ([72.14.220.153:37490] helo=fg-out-1718.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 9C/82-57672-3AFC5794 for ; Tue, 20 Jan 2009 08:20:36 -0500 Received: by fg-out-1718.google.com with SMTP id 16so1372958fgg.23 for ; Tue, 20 Jan 2009 05:20:31 -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=F8Q8mWUEUQYS4i6Ta7CmhStI3O9udnThrZUtf4Hvf3w=; b=lm6NBj7Ypn1yAW9XwPt1yn1X2FbbSw9KrpgucL1QxD94APc1vExYAZcDtnTS71gbsK G70UyK9ZtX0efikrRZkqLvqIbVn5kdQh7q3UNH2fNkiOKC3q1YDSzEf7hNfUivV/Sxou Dej57mifs9tlW5cWjCIMuD2gDa8NElL9hkN7w= 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=fu5+peBkZnDpgkEyhBUqyKGlJSRLc82K9yfwK17VdS77QGJ4+WVwSRbOAC8TesH14E o5TKAGFlqLzuVom1jot0HdLIoEuUn0BfO+Th3qxoscwoWpfgJfHYna1XKr9z9n8lDYPR oYl6NI2NPFw+ZUXcBg2UE6JBVrOCKDnSnMfz0= Received: by 10.86.4.2 with SMTP id 2mr364856fgd.43.1232457631534; Tue, 20 Jan 2009 05:20:31 -0800 (PST) Received: by 10.86.35.9 with HTTP; Tue, 20 Jan 2009 05:20:31 -0800 (PST) Message-ID: Date: Tue, 20 Jan 2009 14:20:31 +0100 Sender: ekneuss@gmail.com To: "Hannes Magnusson" Cc: "Stan Vassilev | FM" , "internals Mailing List" In-Reply-To: <7f3ed2c30901200441i144e4ddasef7ac57b3e5106eb@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <1229538590.4955.15.camel@localhost> <28434894.20081217221911@marcus-boerger.de> <7f3ed2c30901200441i144e4ddasef7ac57b3e5106eb@mail.gmail.com> X-Google-Sender-Auth: eb101a1c1b0c4281 Subject: Re: [PHP-DEV] New function proposal: spl_object_id From: webmaster@colder.ch ("Etienne Kneuss") Hello, On Tue, Jan 20, 2009 at 1:41 PM, Hannes Magnusson wrote: > On Tue, Jan 20, 2009 at 13:26, Etienne Kneuss wrote: >> >> 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 => 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