Performance tests

32 views
Skip to first unread message

Alec McEachran

unread,
Jan 26, 2010, 3:31:06 AM1/26/10
to as3-s...@googlegroups.com
I've put together some rudimentary tests for comparing the relative
speeds of events and signals. I would welcome all of your feedback:

http://alecmce.com/as3/events-and-signals-performance-tests

Alec

Ondina

unread,
Jan 26, 2010, 5:04:34 AM1/26/10
to as3-signals
Hey Alec,
Thanks for the cool tests:)
Here my results for a Flex App and an AIR App(both release build) ,
Windows:

Flex App in Browser:
––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––
performancetests.CapturedEventsTest (5
iterations)
Player version: WIN 10,1,51,66 (debug)<-----DEBUG version
––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––
method.................................................ttl ms...avg ms
dataEvent .............................................801 160.20
dataEventOptimised ..............................814 162.80
dataSignal ..........................................1446 289.20
simpleEvent..........................................787 157.40
simpleEventOptimised ........................ 775 155.00
simpleSignal .......................................1290 258.00
––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––
performancetests.EventsTest (5
iterations)
Player version: WIN 10,1,51,66 (debug)
––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––
method...................................................ttl ms...avg
ms
dataEvent .............................................462 92.40
dataEventOptimised ............................. 460 92.00
dataSignal ...........................................419 83.80
simpleEvent ....................................... 448 89.60
simpleEventOptimised ......................... 448 89.60
simpleSignal .......................................289 57.80
––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––

AIR App:
––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––
performancetests.CapturedEventsTest (5
iterations)
Player version: WIN 10,1,50,334 (regular)
––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––
method..............................................ttl ms...avg ms
dataEvent.......................................... 552 110.40
dataEventOptimised........................... 551 110.20
dataSignal..........................................861 172.20
simpleEvent....................................... 529 105.80
simpleEventOptimised ....................... 526 105.20
simpleSignal...................................... 788 157.60
––––––––––
performancetests.EventsTest (5
iterations)
Player version: WIN 10,1,50,334 (regular)
––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––
method...................................................ttl ms...avg
ms
dataEvent...............................................274 54.80
dataEventOptimised .............................. 266 53.20
dataSignal ............................................190 38.00
simpleEvent...........................................247 49.40
simpleEventOptimised ..........................244 48.80
simpleSignal..........................................116 23.20
––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––

alec

unread,
Jan 26, 2010, 5:56:03 PM1/26/10
to as3-signals
Hmm, that's extremely interesting. It implies that FP 10.1 may have
optimised event handling. However, may I point out that the player
really should be a release player, not the debug build (unless you
release debug builds?!)

Thanks for the feedback, this demands closer attention.

alec

unread,
Jan 27, 2010, 12:38:40 AM1/27/10
to as3-signals
I have just downloaded and installed the latest Flash Player
10.1.51.66 and ran the tests through Safari on my browser. I get very
different results:

––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––
performancetests.EventsTest (5
iterations)
Player version: MAC 10,1,51,66 (regular)
––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––
method...................................................ttl ms...avg
ms
dataEvent 2344
468.80
dataEventOptimised 2270 454.00
dataSignal 313
62.60
simpleEvent 2755
551.00
simpleEventOptimised 2285 457.00
simpleSignal 174
34.80
––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––

––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––
performancetests.CapturedEventsTest (5
iterations)
Player version: MAC 10,1,51,66 (regular)
––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––
method...................................................ttl ms...avg
ms
dataEvent 2708
541.60
dataEventOptimised 2703 540.60
dataSignal 1182
236.40
simpleEvent 2724 544.80
simpleEventOptimised 2717 543.40
simpleSignal 1042 208.40
––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––

Ondina

unread,
Jan 27, 2010, 3:09:55 AM1/27/10
to as3-signals
Hi Alec,
As you can see the performance is better in the AIR application. I
don’t know which are the differences between the Flash players
(Browser<-->AIR). Anyway it seems that for AIR there is a regular
player running ..
I’ll run the tests on my MAC OS too, where as far as I remember I
have a regular Flash player installed, not the debug version for the
browser. But then WIN and MAC are also 2 different worlds…..
I’ll post the results later today or over the weekend.
If Signals are faster than Events it’s a good thing, but to me what
really matters is that Signals aren’t worse than Events :) I’m
trying to use as3-signals inside my robotlegs project.
Ondina

Ondina

unread,
Jan 27, 2010, 3:25:48 AM1/27/10
to as3-signals
Hehe, I don’t release debug builds, but the player is a Debugger
Version, that I need during development. I don’t know whether that
matters or not when it comes to speed, memory, etc?
Ondina

Joel Hooks

unread,
Jan 27, 2010, 3:30:36 AM1/27/10
to as3-s...@googlegroups.com

On Jan 27, 2010, at 2:09 AM, Ondina wrote:

> If Signals are faster than Events it’s a good thing, but to me what
> really matters is that Signals aren’t worse than Events :) I’m
> trying to use as3-signals inside my robotlegs project.

Yes and yes. As long as Signals aren't orders of magnitude SLOWER than I am happy.

alec

unread,
Jan 27, 2010, 5:48:06 PM1/27/10
to as3-signals
I agree, but speed is a necessary component of the evaluation process
for libraries, so I'd like to get numbers I can rely on!

Also, if there is a major disparity between Mac and Windows here, then
that opens up a whole can of worms that needs to be looked at very
carefully. If it looks like Adobe might make me write the following,
I'm going to give up Flash:

if (isIE) ... (or isWindows in this case!)

Ideally Ondina, I'd suggest we want to test in a release player inside
a browser, since that's where the majority of applications are
targeted (I stand to be corrected on this, and of course, you test
where it's most relevant to you!)

Reply all
Reply to author
Forward
0 new messages