Improvement
Stephen Travis Pope
stp at create.ucsb.edu
Sat Jan 22 02:47:14 UTC 2000
For another benchmark of Pierre's "improvement," a simple test of
SortedCollection>>select: such as,
| co ra |
co := SortedCollection new.
ra := Random new.
5000 timesRepeat: [co addLast: ra next].
co reSort.
Transcript cr; show: 'Select: ',
(Time millisecondsToRun:
[co select: [ :i | i odd]]) printString, ' msec'; cr.
took 15 sec on a 450 MHz Pentium before changing the add: to addLast: in
OrderedCollection>>select: and 50 msec afterwards!!!
Let's see, 15000 / 50 = 30000% "improvement."
--
stp
Stephen Travis Pope -- http://www.create.ucsb.edu/~stp
More information about the Squeak-dev
mailing list
|