1 Create a new array to avoid using its constructor.
To do so :var _test = []; Instead of doing :var _test = new Array();
2 Create the array is a great consumption of the operation, so please be careful for the following types of operations:
var _city_1:Array = new Array(); var _city_2:Array = new Array(); var _city_3:Array = new Array(); var _city_4:Array = new Array();
3, the fastest way to copy an array is:
var _copyArray:Array =sourceArray( The original array name ).concat();
4 No matter what way you are, set the value for the array element is a slow operation.
factory.push(machine); // Array name .push( Elements or objects ) factory[1]=machine; // Array name [1]= Elements or objects ;
5 in the array to get a value of speed is set to a value twice.
var factory: Factory= Factorys[1];
6, the attribute function is set to a static function, so use it when you do not need to instantiate a class object.
Example.toString(1);
Class definition:
package { public final class Example{ public static function toString(_numInfo:uint) : String { var _convertStr: String=uint.toString(); return _convertStr; } } }