Randomize Everything

Icon

And create the perfect world

Quicktip #5: int is faster than uint

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.

Read the rest of this entry »

Quicktip #1: Casting to Number()

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’.

Read the rest of this entry »