Any Which Array but Loose.. the code

For those that attended my 360|Flex session on Array/DataStructure performance, here is an updated version of the code I was using to demo. A few things:

  1. The timing method I am using only has millisecond resolution. So, the difference between 0 and 1 millisecond could change in subsequent calls. I would pay more attention to the difference between 1 and 100, which is what we really care about.
  2. Right not the default number of items being created in each structure is set to 5000. You can change this and the insert/delete numbers by changing the constants in the main MXML file
  3. Playing with the aforementioned numbers will really help you get a sense of how these things work. For instance, it is really interesting to see the difference between sorting the ArrayCollection up front or later as the array size grows.
  4. There are (n) more variations of each of these.. using push() instead of direct addressing. Telling the vectors to be fixed size instead of dynamic. I kept this open enough that you should be able to add those cases and explore as you see fit, but I didn’t cover every permutation in this code
  5. I added some filters on the main page so that you can easily lose/add tests or datapoints to get a better view of the data
  6. I didn’t include the LinkedListCollection code in this package. I will get that out soon, but I want to clean it up and comment it. It is confusing to me right now and I wrote it

Okay, so, that’s it. Have fun and play. In the end, this is all about finding the best tool for any particular job.

Labriola Download


    Thanks muchly for the code – very nice!

    Are your slides posted anywhere? (didn’t see them on the thumb drive)

    • by Ped
    • 1:05 pm, May 21, 2009
    • Reply

Leave a Reply