int

Quicktip #5: int is faster than uint

Posted by Bart Claessens on June 15, 2009
ActionScript 3, Flash, Flex, QuickTips / No Comments

The past few weeks I’ve been programming a scheduling component in Flash which has to be extremely performant. Every small adaption in my code that could help with limiting the processing needs is a good adaption. Today I stumbled upon a post of Grant Skinner in which he explains that using a uint is slower than a normal int. The uint’s can get five times slower than using a normal int.

Continue reading…

  • Share/Bookmark

Tags: , , , , ,

Quicktip #1: Casting to Number()

Posted by Bart Claessens on November 21, 2008
QuickTips / No Comments

Did you know that casting a String to a Number using the ‘as’ operator returns 0 instead of the correct number? Use the Number() constructor to cast it correctly. The same applies for ‘int’ and ‘uint’.

Continue reading…

  • Share/Bookmark

Tags: , , , , ,