[Q] RunArray>>, and #copyReplaceFrom:to:with

Andreas Raab Andreas.Raab at gmx.de
Wed Oct 17 03:05:45 UTC 2001


Bijan,

> Very interesting! My #contentsChanged went from around 1723
> msec. to 440 msec., so this certainly seems worth it.

Indeed. It seems like my little benchmark with #addAttribute:from:to: wasn't
quite accurate in modelling the typical behavior exactly. Your results seem
to imply that the #addAttribute: speedup in the real world is very close to
the #copyReplaceFrom: speedup.

> I don't know how this compares to Scott's tweak, or if
> they're compatible, although, my first guess is that they are.
> My second guess is back to "I have no idea!"

They are related in spirit (namely that of speeding up
#addAttribute:from:to:) but in the implementation they're very different.
Scott tried to speed up copyReplaceFrom:to: for OrderedCollection - I simply
got rid of it's use at all ;-) [**] So it may well be that there are other
places in which Scott's changes can make a significant difference.

[**] And I fixed various places that were broken, such as
RunArray>>addFirst: and #addLast: which were expecting OrderedCollections
for both runs and values but almost never had an OC for the runs.

Cheers,
  -- Andreas





More information about the Squeak-dev mailing list