In Flash Player 10 with vectors, why should you use Array?

Is there any reason to stick to arrays as the default list data structure in AS3 if you are targeting Flash Player 10? Why not use the Vector (typed arrays) by default in your entire program, as they are:

  • faster
  • type checked

Does it really work poorly or has higher memory overhead? Any reasons to use arrays more?

+5
source share
5 answers

I answer my question based on what I learned about the problem.

: - ()

  • UINT
  • Boolean

:

:

  • /
    • [5] = Val
    • ( )
  • ()

:

  • String.split()
  • - JSON

:

  • [Vector of ints] [Vector of ints]
  • ( )
    • [Vector of ints] [Vector of Strings]
    • [Vector of ints] Vector of ints
+4

. , , 999, 1000 . .

+6

, , - , . , JSON.

: , - String.split(). . Dunno, Vector.<String> , grr.

, Flash 10+, 99% Vectors. "" ( ) .

+3

, . , - . , ( ), .

: : -)

+2

, . ? . ? , , . - , , , , . , - " " - . , .

+2

All Articles