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.
Posts Tagged types
Loops With int and uint
Jun 20
Typecasting: Part 3
Jan 17
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.
Array vs. Vector Part II
Mar 23
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.
Details of toString()
Jun 17
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.
Null and Undefined
Jun 10
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.