Posts Tagged types

Loops With int and uint

Tags: , , , , , , , , ,

AS3 has two integer types: int and uint. In my experience, most AS3 programmers just use int everywhere and ignore uint. This is usually acceptable as the need for unsigned integers is rare compared to their signed counterparts. However, there are significant performance differences between the two. Read on for the impact of uint on your loops. The original version of this article’s performance test contained a small-but-critical error that led to a lot of incorrect analysis and results. This version of the article has been corrected.

Read the rest of this article »

8 Comments

Typecasting: Part 3

Tags: , , , , , , , , ,

Today’s article is a followup to an article (Cast Speed, itself a followup to Two Types of Casts) from September that continues to gather comments. Sharp-eyed reader fastas3 brought up a good point that warranted some further investigation into the topic. So today we’ll be taking yet-another look at typecasting in AS3 to try to unravel some of its strange mysteries.

Read the rest of this article »

10 Comments

Array vs. Vector Part II

Tags: , , , , , ,

Today’s article is in response to some interesting comments on the previous article comparing Array‘s performance to that of Vector. Today I’ll test different types of Vectors and the performance of deleting elements.

Read the rest of this article »

15 Comments

Details of toString()

Tags:

When an object is converted to a String, it is first checked for a toString() method. But there are subtleties to this that you may not have considered.

Read the rest of this article »

No Comments

Null and Undefined

Tags:

Usually languages just have one way to specify “no value”. Call it null or nil or whatever you’d like, but AS3 and JavaScript have two: null and undefined. Here’s a little bit to help you understand when and why you’ll come across the two as well as some tricky differences between them.

Read the rest of this article »

1 Comment