Today’s article is the second in a series re-testing previous performance articles with Flash Player 10.1 and comparing the results to those that I got with Flash Player 10.0. If you haven’t already read the first part of the series, that’s probably a good place to start. If you have, read on for more performance comparisons!


This part’s performance methodology will be the same as last time, so let’s delve straight into the comparisons.

Try/Catch Slowdown

Original Article

Try/Catch No Try/Catch
Flash Player 10.0 560 272
Flash Player 10.1 873 873

Note that I took an average of the many times reported in the original article to simplify the table; the original times didn’t vary much anyhow. While there no longer appears to be any slowdown at all related to the try/catch block, both numbers are now much slower than the originals! The try/catch version sees a 1.55x slowdown and the version without a try/catch sees a 3.22x slowdown. This is rather unexpected— and unfortunate— since we saw in the last article that loops have been greatly sped up in 10.1.

Building XML

Original Article

XML Class String Class
Flash Player 10.0 369 2
Flash Player 10.1 56 1

It’s hard to tell what’s going on with the String class here since the value simply went from 2 to 1, but this test does show a major improvement in the XML class speed. At least for this simple XML building exercise there seems to be a 6.5x speedup!

Shape vs. Sprite

Original Article

Shape FPS Sprite FPS Shape Memory Sprite Memory
Flash Player 10.0 39 39 36916 85172
Flash Player 10.1 60 60 35460 50668

In both performance and memory, Flash Player 10.1 is way ahead of Flash Player 10.0. The performance test shows a solid 1.5x speedup while the memory test shows a 40% drop for Sprite, but very little change for Shape. Sprite and Shape are at the core of Flash’s rendering system, so it’s good to see their performance improved so greatly in 10.1.

Function Performance

Original Article

Plain Local Var Method Static Override super Interface Direct Interface via Interface Interface via Class
Flash Player 10.0 1969 625 670 48 60 48 87 48 65 46
Flash Player 10.1 268 198 200 58 66 58 64 63 127 62

There are quite a few differences in function call performance. Firstly, the “dynamic” functions— plain, local, and var— have all been sped up by about 3x, which is great for anyone doing functional programming or using callbacks, events, or signals libraries like TurboSignals. Unfortunately, the “normal” functions— method, static, override, interface direct, interface via class— are all slower by about 25-50%. The oddball of the group is definitely function calls through super, which is uniquely faster among the “normal” functions group. Overall I’d consider this test to show a general decrease in performance as “normal” function calls occur much more often than “dynamic” ones.

Simple Regular Expressions

Original Article

String.lastIndexOf() String.indexOf() RegExp.test() RegExp.exec()
Flash Player 10.0 6 6 142 139
Flash Player 10.1 3 6 110 108

Most of these operations have been improved in Flash Player 10.1. While it would seem incredibly simple, String.indexOf is now twice as fast as before. The regular expression versions are marginally quicker too with both RegExp.test and RegExp.exec turning out a 1.29x speedups.

More To Come

So far we’ve seen a lot of speedups and slowdowns in Flash Player 10.1. There are about 20 more performance tests to go, so there are a lot more performance differences yet to come!