[Newbies] collection enumeration
cdrick
cdrick65 at gmail.com
Thu Aug 24 12:00:13 UTC 2006
> This can be fast if collection is an array and if you say "1 to:
> collection do: [:index | ..."
> instead of creating an interval. The compiler cheats for to:do: on a
> SmallInteger and doesn't create the block. But I would only use this
> if the profiler showed it was a real improvement. Almost always I
> would use option C.
same here or the method Bert has given.. #withIndexDo:
More information about the Beginners
mailing list