Tuesday, August 18, 2009

Flex getItemAt() function vs Array Notation

Just a quick tip I found while doing some debugging on a Flex project I am working on.

myArray.getItemAt(0).firstname and
return the same value, the getItemAt() function will save you ten steps. By ten steps I mean that 10 steps after the compiler hits the line that says myArray[0].firstname, it will run the getItemAt() function anyway. It is doubtful that you will see any significant performance gains out of this.

So, it may take more time to type out the getItemAt() function over array notation, but it processes quicker.