Flash "/>

CopyPixels and browser speed limits

18 December 2008 at 9:02 pm

Can it be true that Flash Player running in the Opera browser on Windows XP is more than 4 times faster than Safari on the Mac? It certainly looks like that and I need some help testing…

graffiti.jpg

I’m currently working on a project where I need to offset some bitmaps and I stumbled upon a very interesting speed difference among browsers. I’m shifting a bitmap along X and Y using the copyPixels function. This is apparently the fastest way to set an offset on bitmapData, but the browsers seems to have their own speed limitations? The difference between Safari on OSX and Opera on XP is downright scary…

The test file is set to play at 900 fps, so the results you are getting will be the maximum of what your browser is capable of. If you have the time write a comment with the results you are getting and I’ll add it to the table below. Make sure you specify your CPU speed and that you don’t have other software running that’ll steal CPU time (such as Spotify). Here is the test file and for those in need of an image scrolling class, here’s the AS3 class and the class to create the test as well. (The image is a neat graffiti I found just up the street from Bill’s in Brighton).

PS: I know the Flash IDE can’t be set to more than 120 fps, but in a Flex actionscript project you can set it to 999fps without any problem…

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         
BrowserOSCPU speedPlayer versionFps result
FirefoxMac OS 10.5.52 x 2,8 GHz Quadcore Xeon10,0,12,3654
 Mac OS 10.5.52 x 2,8 GHz Quadcore Xeon9.0.124.055
 Mac OS 10.5.62,4 GHz Core 2 Duo10,0,12,3660
 Mac OS 10.5.52,4 GHz Core 2 Duo10,0,12,3634 (?)
 Mac OS 10.5.52.1 Ghz Core 2 Duo10,0,12,3649
SafariMac OS 10.5.52 x 2,8 GHz Quadcore Xeon10,0,12,3660
 Mac OS 10.5.52 x 2,8 GHz Quadcore Xeon9.0.124.062
 Mac OS 10.5.62,4 GHz Core 2 Duo10,0,12,3653
 Mac OS 10.5.52.1 Ghz Core 2 Duo10,0,12,3643
OperaMac OS 10.5.52 x 2,8 GHz Quadcore Xeon10,0,12,3619
 Mac OS 10.5.52 x 2,8 GHz Quadcore Xeon9.0.124.014
FirefoxWin XP2 x 2,8 GHz Quadcore Xeon10,0,12,36133
 Vista Ultimate3 Ghz Core 2 Duo10,0,12,36130
 Vista 64bit2.6 Ghz Core 2 Duo10,0,12,36136
 Win XP2.5 Ghz Quadcore Xeon10,0,12,36139
 Vista Ultimate2.4 Ghz Core 2 Duo10,0,12,36134
 Win XP2.4 Ghz Core 2 Duo10,0,12,1072
 Win XP (Parallels)2.4 Ghz Core 2 Duo10,0,12,36137
 Vista 64bit2.0 Ghz Core 2 Duo10,0,12,36136
 Win XP1.8 Ghz Core 2 Duo10.0.12.36130
ChromeVista Ultimate3 Ghz Core 2 Duo10,0,12,36120
 Vista 64bit2.6 Ghz Core 2 Duo10,0,12,3680
 Win XP2.5 Ghz Quadcore Xeon10,0,12,36115
 Win XP2.4 Ghz Core 2 Duo10,0,12,10104
 Vista 64bit2.0 Ghz Core 2 Duo10,0,12,3680
OperaWin XP2 x 2,8 GHz Quadcore Xeon10,0,12,36279 (!)
 Vista Ultimate3 Ghz Core 2 Duo10,0,12,36134
 Vista 64bit2.6 Ghz Core 2 Duo10,0,12,36166
 Win XP2.5 Ghz Quadcore Xeon10,0,12,36240
 Win XP2.4 Ghz Core 2 Duo10,0,12,10180
 Vista 64bit2.0 Ghz Core 2 Duo10,0,12,36142
SafariWin XP2.4 Ghz Core 2 Duo10,0,12,10144
IE8Win XP2.5 Ghz Quadcore Xeon10,0,12,3663
IE7Vista Ultimate3 Ghz Core 2 Duo10,0,12,3664
 Vista 64bit2.6 Ghz Core 2 Duo10,0,12,3665
 Vista 64bit2.6 Ghz Core 2 Duo10,0,12,36136
 Vista Ultimate2.4 Ghz Core 2 Duo10,0,12,3664
 Vista Ultimate2.4 Ghz Core 2 Duo9.0.115.064
 Vista 64bit2.0 Ghz Core 2 Duo10,0,12,3665
IE6Win XP2 x 2,8 GHz Quadcore Xeon10,0,12,3663
WebkitNokia N8000.33 Ghz TI OMAP 24209.0.48.08 😊
WebkitPS33.2 Ghz CELL9.0.124.065