I’ve been looking at a lot of AVM2 bytecode recently with the excellent Nemo440 AIR app. Some of the code was using my inline Math.ceil() function and I noticed that the int() cast is implemented like any other function call. Today’s article will show you how to optimize the inline Math.ceil() call even further by avoiding this function call.
Posts Tagged performance
Today’s article is in response to some interesting comments on the previous article comparing Array‘s performance to that of Vector. Today I’ll test different types of Vectors and the performance of deleting elements.
Amazingly, I’ve never done a straight shootout between Vector and Array on this site. It’s a simple test, so read right on to see what kind of added performance you can get by using Flash 10’s Vector.
Anybody who has ever had a performance problem with a graphically-rich Flash app has seen the “Show Redraw Regions” option in the debug player. Well, at least I hope they have since it’s right there in the context menu and there’s even a function call to toggle them. Normally it’s pretty straightforward what gets redrawn and when, but when you start to mix in advanced features like scrollRect and cacheAsBitmap, things get complicated. Today I’m going to cover a technique for eliminating some mysterious redraw regions.
This is a quick article to discuss a point brought up in a recent comment. Which is the fastest way to increment: j++, ++j, or j+=1? Likewise, which is the fastest way to decrement? Below I will dispel the myth that there is any difference between them at all.
Version 10.5 of Opera was released today. Opera 10.0 last performance test made some small strides over 9.64, but it was still the slowest current version of the browser out of the whole test. Also, Google Chrome was updated on January 25th and Mozilla released Firefox 3.6 on January 21st. Today’s article shows an updated performance comparison to check up on the progress being made by Opera, Google, and Mozilla.
I’ve previously covered ways of implementing in my article on Runnables (aka observers) which showed how to call back about 15 times faster than just using a Function object. There are still more ways to call back though and I didn’t cover them at the time. Today I’ll be adding to Function and Runnables by testing Event and the as3signals library by Robert Penner.
Continuing in the series on linked lists that started with parts one and two, today I’ll make the first serious optimization pass on the LinkedList implementation. Read on for how successful this is.
Last time I began covering linked lists in AS3. As anyone who has ever taken a data structures class can tell you, this is definitely a core data structure. As such, it has numerous benefits compared to other single-dimensional data structures like arrays and hash tables. The Array class in AS3 is far from a C/C++ array, which is simply a contiguous block of memory. AS3’s Array class blurs the lines between arrays, linked lists, and hash tables. So as I implement a linked list class in AS3 it is quite interesting to see how the normal pros and cons change. I’ve expanded on the LinkedList class I started last week and done some more preliminary performance testing. Read on to see the updates.
I’ve written before about linked lists when I covered free lists. There were massive speedups to be had there, but that article mostly covered the performance costs of allocation and deallocation. Today is part one of a series that more generally covers linked lists.