The Artima Developer Community
Sponsored Link

Agile Buzz Forum
List vs. OrderedCollection

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
James Robertson

Posts: 29924
Nickname: jarober61
Registered: Jun, 2003

David Buck, Smalltalker at large
List vs. OrderedCollection Posted: Aug 10, 2004 1:10 PM
Reply to this message Reply

This post originated from an RSS feed registered with Agile Buzz by James Robertson.
Original Post: List vs. OrderedCollection
Feed Title: Travis Griggs - Blog
Feed URL: http://www.cincomsmalltalk.com/rssBlog/travis-rss.xml
Feed Description: This TAG Line is Extra
Latest Agile Buzz Posts
Latest Agile Buzz Posts by James Robertson
Latest Posts From Travis Griggs - Blog

Advertisement
OrderedCollection. Fond memories. I think this was the first object I fell in love with--I was coming from a FORTRAN background, and not having to declare the size of arrays was like, wow!

At some point, List came along. List looks kind of OrderedCollection-ish. The original pitch was that you used List for collections behind List views. So I relegated it to that niche. And have continued to use OrderedCollection for many of my tasks.

I've noticed that many OrderedCollection life cycles are interesting. To begin with, there's a phase were you're building them. In this phase, you just want to add to them. You're not enumerating them or anything. That phase completes after some arbitrary adds. And then it never changes size again. It's basically a static sized array.

I thought I'd relook at List to see how it fared in this common case. For the add: case, adding objects to List is nearly TWO times FASTER than OrderedCollections. For enumerating them via do:, it's about 20% SLOWER.

So I've decided to begin using List a little more. The speeds are a wash I guess, but List is only four characters to spell out, and OrderedCollection is 17.

Read: List vs. OrderedCollection

Topic: How To Create A Custom Widget - Pane Previous Topic   Next Topic Topic: More patent minefields

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use