Hello,

for this use case people typically use Symbols (much faster).

Now you are right we may add a shortcut in string comparison.


2014-05-26 9:51 GMT+02:00 Philippe Marschall <
[email protected]>:

> 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.
>
> Cheers
> Philippe
>
>
>

Reply via email to