Posts Tagged string

The Size of Empty

Tags: , , , , , , , , , , , , , , , , , , , , , , , , , , ,

I was reminded about the flash.sampler API by Grant Skinner’s recent post about it. While only available in the debug player, it can still tell us some valuable information about what goes on in the release player. Today I’m using the getSize function to find out how much memory overhead various classes impose, even when they are empty.

Read the rest of this article »

15 Comments

Simple Regular Expressions

Tags: , ,

Lately I’ve been seeing a lot of AS3 code that uses regular expressions where the normal methods of the String class would seem to suffice. It seems common among programmers of all languages to catch on to new trends even when they do not particularly apply to the task at hand. For example, a new C++ or Java programmer may use templates or generics even for classes where only one data type will likely ever be used. I don’t know why programmers do this and I won’t attempt to tackle such a topic. Instead, I’ll do a test to show why this is a bad idea from a performance perspective.

Read the rest of this article »

2 Comments

The Truth of Strings

Tags: ,

What strings are true? The answer may surprise you.

Read the rest of this article »

No Comments