AS3 Object versus Dictionary

I often see others using the Dictionary object in their AS3 code, which simply maps objects using the String keys and wonders if there is any advantage to using the Dictionary over a simple object if String keys are used. Does anyone know any details about this? I would suggest that, since the object is lighter, it should be faster and more preferable than the Dictionary if used with string keys.

+4
source share
2 answers

Yes, if you use string keys, there is no need to use the Dictionary class.

+5
source

AS3 dictionary objects use less memory. I suggest you use a dictionary object if you plan to store a large number of objects.

+1
source

Source: https://habr.com/ru/post/1341774/


All Articles