Audible Artistry:

Electronic Introspection
The Shy Spectacular
Dance-pop mashup freak-fest
Antonio Carlos Jobim - Wave
Mike Laurence, Sax

Ventures:

(coming soon)

Programming:

trary
javascript column-view data browser
flex bench
interactive actionscript benchmarking tool

Miscellaneous Geekery:

max/pk
padKONTROL for Max

time-traveling iconoclast

flex benchmarks are fun for the whole family!
06.16.2008 @ 1:44 AM CST
tags: actionscript, flex
I've spent the last few months digging deep into ActionScript, the programming language for Adobe Flash Player. The result: I now have the power to create unspeakably irritating advertisement banners, surprisingly fun 2D physics-based games, and various charts of dubious usefulness. In the spirit of sharing, I now give you one of the latter: a smattering of ActionScript benchmarks in colorful, bubbly chart form.



This little project was originally inspired by a JavaScript benchmarking page I stumbled across, wherein the author quips "no one should care about JavaScript performance. But if you do, this page will help you get a feel for which operations are fast and which are slow." Pretty much the same rationale applies here - unless you're building a complex, cpu-intensive Flash game (like myself, hence my own interest), you don't need to worry too much about outer static variable access taking a few microseconds longer than inner static variable access.

Usage: click 'Test Iterations' to perform each benchmarking action the specified number of times. Unless you're on a very slow computer, even 150,000 should fly by fairly quick. On some pages, you can also click the 'Auto Test' button, which will incrementally test more iterations until it has a total duration of at least 100 ms, which should give you a decently accurate average duration (note that the number of iterations may be different for each benchmark). You can also hover over the individual bars to see more detailed statistics and the code performed in the iterations (typically without the loop code itself, with the exception of linked list iteration.) Also, feel free to right-click and select "View Source" to look at and/or grab the source code. As usual, the code is licensed under the Creative Commons Attribution-Share Alike 3.0 United States License.

Caveats: I'm still trying to build a better AxisRenderer so the benchmark groupings look more, er, grouped. The Flex BarChart can group ("cluster") by default, but I haven't found a native way to omit empty bars for unequal group sizes or display titles for all group members. Hopefully I'll get that figured out soon, along with a staggered benchmarking engine so that you don't have to wait for all the benchmarks to complete before the chart updates.

And naturally, I'll be adding some more benchmark variations in the near future. Function calls *are* positively thrilling, after all...