Posts Tagged map

Faster Functional Methods for Array and Vector

Tags: , , , , ,

Four years ago I tested the functional programming-style methods of Array and Vector: every, filter, forEach, map, and some. In that article I showed that these functions are much slower than doing the same task through traditional loops. Today’s article seeks to improve the performance of the functional methods while retaining readability by using ASC 2.0’s [Inline] metadata. Can homemade versions of these functions beat the built-in ones from Adobe? Read on to find out!

Read the rest of this article »

No Comments

String Keys vs. Int Keys

Tags: , , , , , ,

Now that we know you can use int keys with Object, it’s time to test whether or not this is any faster than String keys. Today’s article does just that and also tests int and String keys with Dictionary.

Read the rest of this article »


Fast AS3 MultiMap

Tags: , , , ,

Sometimes you need to map a key to many values, but AS3 has no built-in data structure for this purpose. Dictionary and Object are suitable one-to-one maps, but there’s been no one-to-many support until now. Read on for my own one-to-many class—MultiMap—as well as performance testing and analysis.

Read the rest of this article »


XML Speed

Tags: , , , , ,

XML is widely used in AS3 applications for everything from simple configuration files to complex networking protocols. AS3 even includes 10 operators in its syntax specifically to make XML easier to work with. This often leads to AS3 developers loading XML documents and then just leaving them as an XML objects. XML’s performance begins to seep into the rest of the AS3 application. Today we look at just how much this can slow down our apps.

Read the rest of this article »


Map Performance

Tags: , , , , , , ,

I recently received an e-mail from Dmitry Zhelnin (translation) with a test he did concerning the speed of a couple ways to get a value for a key, which I like to call a map and Wikipedia likes to call an associative array. I’d been meaning to do a similar test for a while now and, guess what, I finally have! UPDATE: fixed miss test for fixed-size Vectors.

Read the rest of this article »