Hi,
I'm new to Actionscript (v3), 20 years C++ though, and I'm just trying to get my head around some of the performance caveats I'm reading.
I checked out this site:
http://www.nbilyk.com/optimizing-actionscript-3
and was scared to death of the 'code' section saying that Actionscript has to do a dynamic lookup when trying find static methods in a package. The point being that it is inefficient to put your util-type functions (typically math functions) in their own package as static functions, because it has to lookup the namespace and method dynamically each time you call it.
Is this true? It's just so not what I expected, coming from C++, and it really changes how I structure my code and libraries. I wonder if it's better to have a singleton util library that is new()'d once, containing the methods as normal public methods, than have them static in another package.
Are there any other obvious gotchas like this?
Cheers,
Shane