Quick tip: Array vs. Vector

Take a closer look at the ActionScript 3 memory consumption, when stored huge amount of values in Vector and Array. First list of uints:

(10000000 / 32) uints in a Vector (10000000 bits) = ~7k
(10000000 / 32) uints in an Array (10000000 bits) = ~1228k

… and list of Booleans:

10000000 Booleans in a Vector = ~8k
10000000 Booleans in an Array = ~39070k

Read more about AVM2 Memory Considerations.

Leave a comment

Please be polite and on topic. Your e-mail will never be published.