When you instantiate one of your classes, how much memory does it use? Today’s article tries out a lot of combinations and counts the bytes used. The conclusion is easy to remember and will give you a solid understanding of how much memory your app is using.
Posts Tagged number
This is an extremely common task: converting a
Number to an
int. There are a lot of ways to do it, but which is fastest in AS3? Today we’ll look at a performance test app that attempts to find the fastest way to accomplish this. The answer just may surprise you!
Math.abs is a commonly-used utility function for taking the absolute value of a
Number. However, there’s no special-case version for taking the absolute value of an
int. Of course
Math.abs will work for
int values, but we can do it faster. Read on for a couple of ways.
If you’re thinking “I know what an
int is”, you need to take this little quiz to find out for sure!
Five months ago I said I’d talked about explicit type conversion. I hadn’t, really. What I talked about before was type casts. A cast changes the type, not the data. Today, I’m actually going to talk about type conversion and show you the costs of converting between all of your favorite types:
String, and even
I wrote an article in November 2009 titled Faster isNaN() and a followup to it titled Even Faster isNaN() and continue to get comments on both, so today I’m doing a followup to bring together both articles and the many comments on them into one definitive article. (UPDATE: added Windows performance results)