Daily Commit Log

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Daily Commit Log

commits-2
Changes to Trunk (http://source.squeak.org/trunk.html) in the last 24 hours:

http://lists.squeakfoundation.org/pipermail/packages/2014-September/007277.html

Name: Collections-nice.582
Ancestors: Collections-nice.581

Port TAG-SortFunctions of Travis Griggs from Cincom public store - version (11,tgriggs)

Note that no collation policy were used for String.
The spaceship operator <=> is also required in Kernel-Numbers.

See also the blog http://objology.blogspot.fr/2010/11/tag-sortfunctions.html
 and http://objology.blogspot.fr/2010/11/tag-sortfunctions-redux.html

Note about the cost of these sort functions:
as shown by this mini-bench on cog, using a Symbol costs a bit more (perform:) than a block activation, and monadic block a bit more than dyadic one because activated twice more, but it seems acceptable to me with regard to the great simplification and expressiveness of code :

| collec1 collec2 collec3 |
collec1 := (1 to: 200000) collect: [:i | 1000000 atRandom-500000].
collec2 := collec1 copy.
collec3 := collec1 copy.
{
[collec1 sort: [:a :b | a abs < b abs]] timeToRun.
[collec2 sort: [:e | e abs] ascending] timeToRun.
[collec3 sort: #abs ascending] timeToRun.
}
 #(345 532 912)

=============================================

http://lists.squeakfoundation.org/pipermail/packages/2014-September/007278.html

Name: Kernel-nice.873
Ancestors: Kernel-eem.872

Add spaceship operator support <=>  usefull for sort functions.

=============================================

http://lists.squeakfoundation.org/pipermail/packages/2014-September/007279.html

Name: Collections-nice.583
Ancestors: Collections-nice.582

Also classify these SortFunction support in *Collections rather than *Kernel

=============================================

http://lists.squeakfoundation.org/pipermail/packages/2014-September/007280.html

Name: CollectionsTests-nice.223
Ancestors: CollectionsTests-nice.222

Add some tests for sort functions support

=============================================

http://lists.squeakfoundation.org/pipermail/packages/2014-September/007281.html

Name: CollectionsTests-nice.223
Ancestors: CollectionsTests-nice.222

Add some tests for sort functions support

=============================================