[Pharo-dev] String >> #=

Philippe Marschall philippe.marschall at netcetera.ch
Tue May 27 03:44:24 EDT 2014


On 27.05.14 06:45, Eliot Miranda wrote:
>
>
>
>
> Hi Phillipe,
>
>
> On Mon, May 26, 2014 at 12:51 AM, Philippe Marschall
> <philippe.marschall at netcetera.ch
> <mailto:philippe.marschall at netcetera.ch>> wrote:
>
>     Hi
>
>     I have been investigating why Dictionary look up performance with
>     String keys is not as good as I would expected. Something I noted is
>     that String >> #= is implemented in terms of
>     #compare:with:collated:. There is no short circuit if Strings are
>     not the same size. In my case some Strings have the same prefix but
>     a different length eg 'Content-Type' and 'Content-Length'. In that
>     case a #compare:with:collated: is performed even though we know in
>     advance the answer will be false because they have different sizes.
>
>
> Why not rewrite

Yes, that would be my proposal as well.

Cheers
Philippe






More information about the Pharo-dev mailing list