[Seaside-dev] String >> #=

John O'Keefe wembley at instantiations.com
Mon Jun 2 14:16:28 UTC 2014


Philippe -

In VA Smalltalk:
 * String>>#= is implemented as a primitive. The primitive compares #size
before iterating over the characters
 * No Unicode normalization is done
 * No, this cannot happen.

John

John O'Keefe [|], CTO/Principal Smalltalk Architect, Instantiations Inc.
Skype: john_okeefe2     Mobile:  +1 919 417-3181 (Business hours USA
Eastern Time zone (GMT -5))
john_okeefe at instantiations.com
http://www.instantiations.com
*VA Smalltalk...Onward and Upward!*


On Sun, Jun 1, 2014 at 11:55 AM, Philippe Marschall <
philippe.marschall at gmail.com> wrote:

> Hi
>
> I am currently looking at your dictionary look up performance [1]. We
> use GRSmallDictionary instead of Dictionary in a lot of places with
> string keys (request and response headers, url query fields, …).
> Unfortunately on Squeak/Pharo with 11 keys Dictionary is twice as
> fast. The reason seems to be that String >> #= is quite slow on
> Squeak/Pharo especially with prefix matches. Special casing string
> keys and first sending and comparing #size before #= seems to fix this
> and make GRSmallDictionary again slightly faster than Dictionary.
>
> Before I take any action I wanted to ask how String >> #= is
> implemented in other dialects
>  * Do any dialects first compare #size before iterating over the
> characters?
>  * Do any dialects do Unicode normalization in String >> #=?
>  * Do any dialects implement String >> #= in a way such that two
> strings with different sizes could be considered equal (eg. because
> they do normalization)?
>
>  [1] https://code.google.com/p/seaside/issues/detail?id=793
>
> Cheers
> Philippe
> _______________________________________________
> seaside-dev mailing list
> seaside-dev at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/mailman/listinfo/seaside-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside-dev/attachments/20140602/cb19a2fa/attachment.htm


More information about the seaside-dev mailing list