flash.utils.describeType has been around since Flash 9 and is the standard way to find out interesting information about a
Class type, including its metadata/annotations. However, there’s a hidden function called
describeTypeJSON that provides an interesting alternative. Since
describeType is notoriously slow, could
describeTypeJSON be the speedy alternative we’ve been looking for? Today’s article puts them to the test!
Posts Tagged object
When you instantiate one of your classes, how much memory does it use? Today’s article tries out a lot of combinations and counts the bytes used. The conclusion is easy to remember and will give you a solid understanding of how much memory your app is using.
When I first wrote about master strings I proposed a function that would help to trim them down and potentially save a lot of memory. However, that method still resulted in a string with a master string one longer than it. Ideally, we’d have no master string at all. Since then, three astute readers chimed in with alternate solutions to the problem. Today I put try all three out to see which method does the best job of cleaning master strings.
Dictionary can have
int keys and that
int keys are faster than
String keys, a natural performance test follows: which class is fastest at reading from and writing to those
int keys? Is there a difference between the four
Vector classes? Today’s article performs just that test and comes up with the answers.
Pop quiz: what’s the difference between an
Object and a
Dictionary? If you said “
Dictionary can have non-
String keys”, you bought into a common myth. Today’s article shows the cases where the lowly
Object class will use non-
String keys whether you like it or not. Read on for the details.
Programming in AS3 invariably involves choosing between various collections:
ByteArray, and so on. What if you need to quickly copy between them? Your choice of collection could result in a 450x slowdown in your app… or a 450x speedup!