ActionScript Optimizations

ActionScript is not compiled to native machine code; instead it is converted to bytecode, which is faster than an interpreted language but not as fast as compiled native code. Although AS can be slow, in most multimedia presentations, the assets such as graphics, audio, and video—and not the code—are often the limiting performance factor.

Many optimization techniques are not specific to AS but simply well-known techniques for writing code in any language without an optimizing compiler. For example, loops are faster if items that don't change with every loop iteration are removed from within the loop and placed outside the loop instead.