On 27 May 2014, at 09:44, Philippe Marschall <philippe.marschall@netcetera.ch> wrote:
On 27.05.14 06:45, Eliot Miranda wrote:
Hi Phillipe,
On Mon, May 26, 2014 at 12:51 AM, Philippe Marschall <philippe.marschall@netcetera.ch <mailto:philippe.marschall@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.
Ok, I have added an issue: https://pharo.fogbugz.com/f/cases/13277/Speed-up-String Marcus