Sho just posted a really interested article on why he won't be using the int data type very frequently in ActionScript 3. Up until reading it, I had believed that as in other languages, there were large performance benefits to using ints and uints appropriately in AS3. Turns out that isn't the case.

I did some quick testing on this, which confirm Sho's assertion that int is only slightly faster than Number in ideal circumstances, but the results from uint were much more surprising.

I did a simple test that ran through 16777215 iterations of a for loop, using int, Number, and uint types as the iterator variable. It did 50 passes, and calculated an average time per pass. This should be ideal conditions for using ints and uints. The results were really interesting:

int: 24-26ms
Number: 31-36ms
uint: 105-225ms

So as Sho said, int is not much faster than Number, but it probably still makes sense for use as an iterator and in other obvious cases. But uint is ridiculously slow, and very erratic! The other types were very consistent when I ran this test multiple times (remember the results were from 50 averaged passes, and so should be consistent), but uint was all over the place. Some of the individual passes went as high as 500ms, and as low as 65ms.

My takeaway without more research: Avoid uint, unless you have a really good reason for forcing the type. Use ints where they make sense, but don't agonize over the performance implications of int versus Number. Default to Number whenever you aren't sure. Most importantly, don't take things for granted - test and benchmark wherever you can - you might be surprised by the results!

It's important to note that typing in general does result in huge speed benefits in AS3. Running the above test with an untyped iterator averages 380-430ms per pass (I even had to reduce the number of passes to 20 to avoid a 15 second timeout). It also has a lot of secondary benefits like compile and run-time type checking.

A huge thank you to Sho for posting about this - I'm glad I didn't spend months or years of coding carefully choosing the best numeric type, thinking I was optimizing my code, when in fact I was gaining very little performance (or in the case of uint, actually harming performance).

Update
I've done a few more tests, as per Sho's suggestion, and thought I'd post the results (they are pretty close to what you'd expect based on Sho's post). I used the same methodology as above, but inserted a small formula that was run each iteration. Here are the results:

Assignment ( var a:TYPE = 0; )
int: 24-45ms
Number: 24-36ms
uint: 25-37ms

Statistically, they look the same, which is to be expected.

Assignment ( var a:TYPE = 0.5; )
int: 56-83ms
Number: 26-43ms
uint: 57-92ms

Predictably, Number is faster for fractional assignments, as the value does not need to be converted to an integer.

Division ( var a:TYPE = i/2; )
int: 60-105ms
Number: 34-64ms
uint: 184-278ms

Number is a much faster type for division, as expected from Sho's post. uint trails badly.

Multiplication ( var a:TYPE = i*2; )
int: 78-129ms
Number: 39-64ms
uint: 207-280ms

Similar results to division. I thought int might perform better as the value would never have to be converted to a float (whereas in division it would).

Addition ( var a:TYPE = i+2; )
int: 31-49ms
Number: 44-55ms
uint: 85-113ms

As expected from the plain iterator test, int is slightly faster for integer addition.

Bitshift ( var a:TYPE = i<<1; )
int: 31-63ms
Number: 61-114ms
uint: 71-130ms

int outperforms Number fairly handily in bit operations, this is likely because Number needs to be converted into an int to have bit operators applied. This is the only test so far that uint does passably well in (other than assignment).