Hello,

On Tue, Jan 20, 2009 at 2:38 PM, Etienne Kneuss <webmas...@colder.ch> wrote:
> Hello,
>
> On Tue, Jan 20, 2009 at 2:23 PM, Guilherme Blanco
> <guilhermebla...@gmail.com> 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 <webmas...@colder.ch> wrote:
>>> Hello,
>>>
>>> On Tue, Jan 20, 2009 at 1:41 PM, Hannes Magnusson
>>> <hannes.magnus...@gmail.com> wrote:
>>>> On Tue, Jan 20, 2009 at 13:26, Etienne Kneuss <webmas...@colder.ch> 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
>>>
>>> --
>>> 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: guilhermebla...@hotmail.com
>> URL: http://blog.bisna.com
>> São 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
>



-- 
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

Reply via email to