Issue 4956 in pharo: Optimized RunArray

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

Issue 4956 in pharo: Optimized RunArray

pharo
Status: Accepted
Owner: ----
Labels: Milestone-1.4 Type-Feature

New issue 4956 by [hidden email]: Optimized RunArray
http://code.google.com/p/pharo/issues/detail?id=4956

Very few operations on a RunArray are used for handling Text.
So it's reasonnably optimized for this usage.

But I got another use case and discovered that implementation was awfully  
naive and slow for almost any other message.
As it can serve as a general library, I propose some optimizations (also in  
squeak inbox).

And I also propose to move it off ArrayedCollection.
1) this is useless (tell me what does it inherit exactly?)
2) this is misleading (the structure is not that of a simple Array, is it?)

And as the RunArray can #add: there is no reason to not implement #remove:

See attached file-out

Attachments:
        RunArray.st  23.6 KB


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 4956 in pharo: Optimized RunArray

pharo
Updates:
        Status: FixReviewNeeded

Comment #1 on issue 4956 by [hidden email]: Optimized RunArray
http://code.google.com/p/pharo/issues/detail?id=4956

Name: SLICE-Issue-4956-Optimized-RunArray-nice.1
Author: nice
Time: 31 October 2011, 8:38:52 pm
UUID: 6de19226-800e-4a05-8b8e-48fae872b73a
Ancestors:
Dependencies: Collections-Sequenceable-nice.111,  
Collections-Arrayed-nice.64, CollectionsTests-nice.533

Here is an optimized version of RunArray.

I'm not sure of load order, because RunArray is changing of category...  
(Arrayed -> Sequenceable). Fingers crossed...

Note that RunArray new = Array new is now false
Rationale: since Array new = RunArray new was false already, it's a good  
thing to preserve symetry.
This requires the rewrite of a few tests.


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 4956 in pharo: Optimized RunArray

pharo

Comment #2 on issue 4956 by [hidden email]: Optimized RunArray
http://code.google.com/p/pharo/issues/detail?id=4956

Thanks!!!!
I will check that.
I love this idea that we revisit all these old assumptions!
Thanks again.


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 4956 in pharo: Optimized RunArray

pharo
Updates:
        Status: Closed

Comment #3 on issue 4956 by [hidden email]: Optimized RunArray
http://code.google.com/p/pharo/issues/detail?id=4956

in 14219
Thanks a lot.


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker