4 ms·
> Well, shit... Alchemy+Stage3D is directly a competitor to NaCl+WebGL. First of all, NaCl has little to do with WebGL. NaCl has it's own, non-web-standard way
by azakai 15y ago
> Well, shit... Alchemy+Stage3D is directly a competitor to NaCl+WebGL.
First of all, NaCl has little to do with WebGL. NaCl has it's own, non-web-standard way (like NaCl itself) to render 3D graphics. If you use NaCl, you likely do not use WebGL.
> By refusing to help NaCl become open-standards-worthy, Mozilla is going to end up watching Alchemy beat out NaCl (and Emscriptem) with a completely proprietary, revenue-shared (and therefore implicitly licensor-dependent) alternative.
Mozilla can't help NaCl become a relevant standard for the web, even if it wanted to. NaCl is still CPU-specific, still too complex and evolving to standardize and create alternate implementations of, and still will not be supported by browsers without plugins like the iOS browser and Windows 8 Metro.
Alchemy might beat out NaCl. It works in far more places than NaCl, but it's slower, so that will be interesting to watch. But I very much doubt Alchemy will beat 3D gaming on the open web. It isn't just Emscripten, it's also Mandreel and several other C++ to JS compilers in the industry. That approach reaches more people than even Alchemy, and it reaches them with 0 license fees.
- corysama 15y agoOK, technically OpenGLES2 is the open-standard that the open-web-standard WebGL is based on. Still a big step in the right direction compared to Stage3D. Moving from ES2 to a C++ interface to WebGL would not be a huge pain at this point if someone pushed for it. That's how Mozilla /can/ help NaCl become a relevant standard for the web. It's still evolving rapidly! That could be a good thing because it's far too complex and cpu-specific /now/. With Moz's participation, that evolution could be directed to something standardizable. It's a lot of work, but it's better than sitting back and watching Adobe take over without asking for anyone's support. Right now, Alchemy runs at 40% of native speed. They are targeting 80% at public launch. We'll see how that goes... Meanwhile, I've dug deep into the performance of JS and I've been happy when I can get deeply-optimized JS to reach 10% speed compared to deeply-optimized native.
- azakai 15y agoMozilla can't make NaCl non-CPU specific. It's CPU specific by design. PNaCl, which tries to be portable, is a completely separate project (although the underlying SFI is similar), and it's too early to evaluate the performance there to see if it's worth it. So there is nothing Mozilla or Opera or anyone can do. Deeply optimized JS should run much faster than 10x slower than native. Most benchmarks I've run on compiled code are 2x-6x slower than native. And that is before JS engines actually optimize specifically for that type of code, which is happening this year.
- corysama 15y agoThe point is that Google isn't self-motivated enough to get an Open-PNaCl-Whatever in shape to be standardizable on their own. They need Moz and Opera to push them, not rebuke them. I understand Moz's position. I'm just frustrated. Mozilla seems to be so proud to have finally reaching the point that we can run Super Nintendo games in the browser (http://browserquest.mozilla.org/ http://browserquest.mozilla.org/) only 18 years after http://en.wikipedia.org/wiki/XBAND http://en.wikipedia.org/wiki/XBAND Meanwhile, Alchemy and NaCl can deliver a better-than-iPad3 user experience (zero install + sandboxed, etc) comparable to http://infinitybladegame.com/ http://infinitybladegame.com/ to the browser today. When I speak of deeply-optimized native, I'm talking about large volumes of tuned double-precision SSE vs tuned double-precision math in JS. If I were to cheat and do single-precision in SSE, it would be more like 20x. Moz is talking about adding a Matrix4x4 type to JS to make it easier for games to keep up. That seems to me like a patch to the larger problem of SIMD not making sense the context of JS.
- azakai 15y ago> The point is that Google isn't self-motivated enough to get an Open-PNaCl-Whatever in shape to be standardizable on their own. They need Moz and Opera to push them, not rebuke them. Opera, Mozilla, Microsoft and Apple can't help Google push a standard that doesn't make sense for the web. I don't understand what you want them to do. Help from the other browser vendors can't magically fix the problems already mentioned with NaCl. The only thing they can do, is ignore the principles of standardization and what is good for the web, and just drop NaCl into their browsers. That would be terrible though. > Meanwhile, Alchemy and NaCl can deliver a better-than-iPad3 user experience (zero install + sandboxed, etc) comparable to http://infinitybladegame.com/ http://infinitybladegame.com/ to the browser today. http://dl.dropbox.com/u/6873971/data/cube2/index.html http://dl.dropbox.com/u/6873971/data/cube2/index.html And again, this is before actually optimizing for that kind of code. In a few months that will improve even more. > When I speak of deeply-optimized native, I'm talking about large volumes of tuned double-precision SSE vs tuned double-precision math in JS. That's true, for that kind of code JS is slow currently. Things like RiverTrail should help, but they are not close to ready yet.