Object turnover.

Lyndon Tremblay humasect at shaw.ca
Thu Dec 2 23:00:54 UTC 2004


Time millisecondsToRun: [ seq := OrderedCollection new.
1000 timesRepeat: [seq add: Point new].
20000 timesRepeat: [1 to: 1000 do: [:n | seq at: n put: Point new]].
]

18633 on AthlonXP 1800+, replaced #x:y: with #new.

That is a strange difference between host processors.

-lyndon

From: "Joseph Frippiat" <joseph.frippiat at skynet.be>
> Hi,
>
> This is what I tried on Squeak 3.7 :
>
> Time millisecondsToRun: [
> seq := OrderedCollection new.
> 1000 timesRepeat: [seq add: (Point x: 0 y: 0)].
> 20000 timesRepeat: [1 to: 1000 do: [:n | seq at: n put: (Point x: 0 y:
0)]]]
>
> I repaced Point zero with Point x: 0 y: 0 (I don't know VisualWorks).
>
> The result is near 18450 on a Pentium 4, 3.40GHz HT.
>
> Compared to 1 second, it is not so fast ... (or did I make a mistake ?)
>
> Joseph
>
>
> ----- Original Message ----- 
> From: "Andreas Raab" <andreas.raab at gmx.de>
> To: "The general-purpose Squeak developers list"
> <squeak-dev at lists.squeakfoundation.org>
> Sent: Thursday, December 02, 2004 9:23 PM
> Subject: Re: Object turnover.
>
>
> > An interesting read here is the following:
> >
> >
http://www.cincomsmalltalk.com/userblogs/travis/blogView?showComments=true&entry=3277556678
> >
> > Squeak isn't quite as fast if you run the benchmarks (though for largely
> > non-GC related reasons) but by and large this should get you a feeling
> > that dealing with lots and lots of objects (and cleaning up afterwards)
is
> > something that these systems (incl. Squeak) have been specifically
> > designed for. It is really, REALLY fast.
> >
> > Cheers,
> >  - Andreas
> >




More information about the Squeak-dev mailing list