Posts Tagged map

C++ For C# Developers: Part 46 – Other Containers Library

Tags: , , ,

Array-like containers aren’t the only containers we need. Today we’ll look at the non-array containers the C++ Standard Library provides, including its equivalents of Dictionary, HashSet, and LinkedList.

Read the rest of this article »

No Comments

C++ For C# Developers: Part 45 – Array Containers Library

Tags: , , , ,

We use certain container types, like maps and dynamic arrays, constantly. Others, like linked lists and queues, more sparingly. Still, they are fundamental structures in virtually every program and the poster children for generic programming. Like C#, the Standard Library in C++ provides a bunch of container types. Today we’ll start going through them, starting with containers for various kinds of arrays!

Read the rest of this article »

No Comments

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 »

10 Comments

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 »

39 Comments

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 »

6 Comments

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 »

13 Comments