Sunday, November 1, 2009

Flash 9 optimization revelation + project progress

read some flash optimization tips, and revealed that flash is different from c++, i'd been wrong so far by using c++ rules to optimise my actionscript code

1) unsigned int is always slower than signed int
2) number is faster than int in multiplication and division operations (!!!!!)
3) function call is expensive in actionscript
4) for(;;) is much slower than for each but .foreach is much slower than both of them
5) closure is very damn slow in actionscript, should never use it
6) uses of static const is more costly (unless it is current in current module)


my project is good, i have multiple wisps display on screen and tower removal is working :)

No comments: