[VW7.7nc] Low performance of UnicodeCollationAlgorithm

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
vam
Reply | Threaded
Open this post in threaded view
|

[VW7.7nc] Low performance of UnicodeCollationAlgorithm

vam
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] [VW7.7nc] Low performance of UnicodeCollationAlgorithm

Alan Knight-3
Yes, the Unicode collation algorithm is quite slow. It needs to do some fairly complicated things, especially normalizing characters. We may end up moving some of that into a primitive. The benefity of the Unicode Collation Algorithm is that it actually gets the right answers. However, if you know that the strings you're comparing don't exhibit those complexities, or you're not that fussy about the exact sorting of code point E9 as compared to code point 65 followed by B4, then you can call a method like trueCompare:, which is much faster and simpler. And if you think that's the case globally, then you can set the collation policy on your locale, or on StringCollationPolicy.

At 08:43 AM 2010-01-22, VAM wrote:

Next code:

words := OrderedCollection new.
1 to: 10e4 do: [:each | words add: 'aaa'].

For 7.6nc
Time millisecondsToRun: [words sorted] 66

For 7.7nc
Time millisecondsToRun: [words sorted]  3502

VAM


--
View this message in context: http://old.nabble.com/-VW7.7nc--Low-performance-of-UnicodeCollationAlgorithm-tp27273309p27273309.html
Sent from the VisualWorks mailing list archive at Nabble.com.

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc

--
Alan Knight [|], Engineering Manager, Cincom Smalltalk

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
vam
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] [VW7.7nc] Low performance of UnicodeCollationAlgorithm

vam
CONTENTS DELETED
The author has deleted this message.