On Sat, 13 Mar 2010, Henrik Sperre Johansen wrote:
On 13.03.2010 01:23, Levente Uzonyi wrote:
On Thu, 11 Mar 2010, stephane ducasse wrote:
Hi guys
tristan is a new student here and he would like to work on collection
optimization and implementation.
I would like the get some ideas from you.
- are there some collections that would be cool to improve?
Here's the list I plan to improve is Squeak:
- OrderedCollection: fix the growing behavior, adding n elements takes
O(n^2) time in some cases
If you're talking about alternate addFirst: addLast: adds, is that really a
usecase worth optimizing for?
makeRoomAtFirst:/Last: can definately be sped up using
replaceFrom:to:with:startingAt: though.
My ideas would result in a general minor speedup, while mixed use of
#addFirst: and #addLast: wouldn't suffer the performance penalty at all.
So we can win something without losing anything.
#replaceFrom:to:with:startingAt: can only be used to move elements to a
position with lower index, otherwise overlapping areas will be
overwritten.
- SortedCollection: just deprecate it (or replace it's crappy quicksort
implementation if you really want to improve it. But I think it's useless)
+1
- StandardFileStream >> #upTo: (the recursive call + concatenation requires
O(n^2) runtime and O(n^2) memory for large chunks of data)
I did a different implementation some time ago, didn't notice enough of a
speedup to consider posting it though. Hope you have better luck :)
I don't have an implementation yet, but I expect ~3-5% speedup if reading
all the sources. This may seem insignificant, but if other bottlenecks are
out of the way, this may be 15-25%. And my opinion is still that "library
functions" should be optimized for most usecases, so this should be fixed.
Levente
Cheers,
Henry
_______________________________________________
Pharo-project mailing list
[email protected]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________
Pharo-project mailing list
[email protected]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project