[squeak-dev] Re: 100 Million objects
Igor Stasenko
siguctua at gmail.com
Fri Feb 29 08:47:26 UTC 2008
2008/2/29 Paolo Bonzini <bonzini at gnu.org>:
>
> >> > out of curiosity (forgot the reason) in a Workspace I did
> >> > a:= Array new: 100000000 withAll: 1.0
> >>
> >> Unless I'm mistaken, this is two objects, an Array and a Float.
> >>
> > Add block contexts created for each iteration for filling array with value.
>
> For #to:do: ? And anyway I'd hope they are short-lived and don't make
> it into oldspace.
>
Yes, but they trigger incremental GC quite often.
> What Klaus wanted was, more likely, something like
>
> (1 to: n) collect: [ :each | each asFloat ]
>
> (Don't try it at home with n = 100,000,000)
>
> Paolo
>
>
--
Best regards,
Igor Stasenko AKA sig.
More information about the Squeak-dev
mailing list
|