mike chambers | about

As3 Vector Performance

ActionScript 3 Vector / Array Performance Comparison

In my original post on the new Flash Player 10 Vector class, I did a simple example that showed Vectors being slightly faster than Array when just populating and looping through collections. Below is another example that shows a more significant performance increase when using Vectors. In this example, I populate an Array and Vector with 5 million random numbers, and then loop through them and average all of the numbers.
twitter github flickr behance