Anyone know of good optimizations to make to code so that it'll run
faster in Flash?

What specific problems are you trying to overcome with these optimizations? Optimizing before the code is completely written isn't optimization, it's simply obfuscation. To optimize something implies that there is an inefficiency you are trying to overcome. If the whole app is just slow, you should spend some time identifying which parts are slow and why, and then you can be much more focused in your optimizations. Randomly replacing chunks of your code with "optimized" code is likely to do no more than confuse you and *maybe* save you a few milliseconds. On the other hand, if you know exactly which loop or function is slow, there may be a number of things you can do to save tenths of seconds instead.

Also, fairly often it is the approach that is inefficient, not the code itself. Fixing your specific inefficiencies may require some refactoring, but you won't know that until you identify and isolate the problem. The goal of optimization isn't to eek out every cycle you can, but rather to make your specific application run as well as it can, and often that means changing the way you approach the problem. Changing your code to use "optimized" loops or whatever may gain you hundredths of a second, but changing your approach can save you several seconds in one fell swoop.

ryanm
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to