WebGL now faster than Flash?

During the last weeks, quite a few people using CopperCube are reporting that they are discovering surprising performance testing results: It appears that for them, the WebGL renderer is faster than the one using Flash and Stage 3D.
Personally, I wasn't able to reproduce these results myself, although I must say that browser developers have improved the JavaScript performance very much recently, especially in Chrome and Firefox. Also, it sounds a bit strange, because Flash is statically compiled down to bytecode, while JavaScript is still very dynamic, and the WebGL 3D engine behind CopperCube, namely CopperLicht uses some of the dynamic features, for example for storing allocated render buffers, WebGLFloatArrays (or Float32Array as they are called now), and similar.


It could be that those CopperCube users reporting that WebGL is now faster for them than Flash are maybe running some throttled flash player (maybe the debug version?) or similar, but it's stange that this is happening now at the same time and that there are quite a few of them. Anyway, it would be nice if you could drop me a line or post a comment if you are having a similar experience.

eight comments, already:

It’s not that surprising really. There are a couple factors involved:

1) JS has been pulling ahead of actionscript for a while now, at least on Chrome’s V8. The JS-JIT by V8 is just really, really good (especially in the hands of an experienced developer that gives it all the right clues). Precompiling to bytecode still may offer some advantages, but those are rapidly melting away.

2) The architecture chosen by the Mozilla/Chrome teams may be hugely beneficial to rendering speed (off process rendering)

3) Composition of the webgl content with the page has been heavily and deeply optimized by the browsers, in a ways that plugins simply can’t (syncing to animation frames, using extensions and texture sharing for page composition, etc.)

4) Chrome/Firefox and the angleproject have a lot of companies behind it and they are completely open so anybody can submit a patch and try to convince the maintainers to take it. Since the WebGL community has been pounding on speed a lot, it’s not surprising that a good amount of changes where brought forward to make WebGL the best it can be (it’s Apple, Google, Mozilla and the Public pulling on the same rope). Adobe just has whatever engineers it hired (probably not all that many) to improve Flash Stage3D. It’s an asymetric competition.
Florian () (link) - 10 05 12 - 09:25

With firefox 12 on linux the results are interesting: WebGL gets noticeably better framerate than flash, plus it’s antialiased.
But on the “Backyard Demo” the WebGL version completely freezes for 1 or 2 seconds at regular intervals. I wonder if those could be GC pauses?
Pedro - 10 05 12 - 12:13

Just tested the Backyard Demo in Chromium and it doesn’t freeze like Firefox, but on the other hand it has much worse framerate (about comparable to the flash framerate)
Pedro - 10 05 12 - 12:19

...the WebGL renderer is faster than the one…
...that WebGL is now faster for them than Flash…
(:
Bob - 10 05 12 - 13:49

Yes, seems also to be dependent on the OS and browser, of course.
@Bob: thx, corrected :)
niko - 10 05 12 - 14:19

The bytecode vs. sourcecode advantage only influences startup time. Bytecode compilers normally do not optimize. That’s all done at runtime.
tobias3 - 10 05 12 - 15:08

I guess on linux, everything is faster than flash.

And I definitly want one of these coachbags :D
Kai Mast () (link) - 13 05 12 - 23:11

delete this topic, admins
smistspidO () - 15 05 12 - 21:48


Name:  
Remember personal info?
yes
no
Email (optional):
URL (optional):
Enter "layered" (antispam):
Comment:Emoticons / Textile

  ( Register your username / Log in )

Notify: Yes, send me email when someone replies.  

Small print: All html tags except <b> and <i> will be removed from your comment. You can make links by just typing the url or mail-address.
Note: If you type in your email adress above, it will be visible to other visitors, although it will be hidden for bots using javaScript.