[ENH] Faster Sorted Collections
Stephen T. Pope
stp at create.ucsb.edu
Sat Dec 4 03:11:55 UTC 1999
I know about the Heap, but the system classes still use boat loads of
SCs and making them faster can accelerate the system libraries and
pre-existing applications. Since most users of SCs use the "new" method
(rather than giving the SC an explicit sort block), the enhancement
makes a real difference.
stp
Michael Rueger wrote:
>
> "Stephen T. Pope" wrote:
>
> > SortedCollections assign a default sort block if none is provided. Since
> > 90% of these blocks are the same, we can save one block activation per
> > sort comparison if we code the comparison directly for collections where
> > the sort block is nil. The attached change set implements this; the
> > speed-up is quite significant for large collections (>100% for 50000
> > items in random order).
>
> Another very fast way to sort is to use the Heap class, which Andreas
> added to Squeak in one update.
>
> Michael
>
> --
>
> "To improve is to change, to be perfect is to change often."
> Winston Churchill
> +------------------------------------------------------------+
> | Michael Rueger |
> | Phone: ++1 (818) 623 3283 Fax: ++1 (818) 623 3559 |
> +---------- Michael.Rueger.-ND at corp.go.com ------------------+
--
stp
Stephen Travis Pope
stp at create.ucsb.edu -- http://www.create.ucsb.edu/~stp
More information about the Squeak-dev
mailing list
|