4 ms·
Lets get real here: Native Client is never going to make it into all browsers, especially mobile ones. The point of this demo is to show that JS is fast enough
by devongovett 15y ago
Lets get real here: Native Client is never going to make it into all browsers, especially mobile ones. The point of this demo is to show that JS is fast enough for our needs and we don't need things like NaCl to get good performance. Yes it runs best in Chrome now, but I have a feeling that other browsers will catch up soon. In fact, it might even run well in Safari now but unfortunately Safari doesn't support Float32Array and there is no shim... Anyway, worth testing.
- azakai 15y agoThe good news from yesterday was that IE10 will have typed arrays. I assume that Safari will enable them by default soon - so all modern browsers will soon support typed arrays, and should run code like this very well. Right now this demo is faster in Chrome it seems, while the original Broadway (H264 instead of WebM) is faster in Firefox, but the important thing is that the differences are not that big, and all JS engines are in very good shape and improving. We'll have even better performance a year from now.
- comex 15y agoActually, Safari already enables typed arrays by default (separately from the rest of WebGL), but the latest stable version doesn't support Float64Array. The demo works fine on the WebKit nightly, although with considerably less FPS than either Firefox or Chrome.
- azakai 15y agoGood to know, thanks for the info! Hopefully Float64Array will be added soon. I'm surprised it is much slower than Firefox and Chrome, though. Apple recently enabled the new JSC JIT on all platforms, I thought, which should be quite fast. Maybe typed arrays have not been specifically optimized yet or something like that.
- tlrobinson 15y ago"Fast enough" pegs my CPU usage at 100%.
- devongovett 15y agoSolutions to that are coming as well. We see parallel processing abilities for JS starting to take shape like Intel's RiverTrail project, and initiatives like WebCL to bring the power of the GPU to the browser as well.