So can you add some dynamic code into asm.js and expect same performance? Asm.js is an assembly that looks like JavaScript for compatibility and readability.
No, asm.js code that parses successfully is compiled ahead of time. It is a strict subset of the JavaScript programming language. If you use parts other than the subset, it will fail to parse as valid asm.js code and revert to the interpreter/JITs.
I got the Fitbit One. You have to manually tell it you're about to sleep and you just woke up, then it tells you how long you stayed in bed, how many times you woke up, and how much deep sleep you had.
Based on that, I averaged that I needed 8 hours of in-bed time to get 7 hours of deep sleep, and then I had no need for the device anymore. Until my sleep patterns change.
The only amazing stuff is the distribution mechanism really. Other stuff is just plain old OpenGL but in your browser this time. It is not like it has some crazy support for raytraced voxels or something.
> The only amazing stuff is the distribution mechanism really.
That's the main thing, but not the only thing.
WebGL is also very portable, more than other flavors of GL. Huge effort has gone into that. As a result there is a much better chance a WebGL app will give the same output on different browsers/OSes/GPUs (and if it does not, that's a bug that should be fixed).
WebGL is also more secure than OpenGL, since it was designed to run in a web browser, that executes unsafe code off the web.
I personally love that OpenGL is 'plain old' haha. Not to criticise your comment at all - but as someone who's been forced to work with OpenGL 3.3-4 quite a lot recently ... it's pretty incredible at times.
Also - as I understand it, what's impressive about all this isn't just the graphics. Once you've passed vertices etc... off to the graphics pipeline then yes Javascript doesn't handle much of the load .... but as we know a lot of games are CPU bound, and the fact that Javascript is increasingly able to offer acceptable performance relative to the native compiled experience of c/c++ is pretty nuts.
So it basically means that C++ got another reasonable compilation target. Not much to do with applying JavaScript to large-scale games. Also it is not HTML 5, it is HTML FF23.
Factually, all code emitted from emscripten is JavaScript. It may look funny with all the bitwise operators that are barely ever used by web developers, but it's just JavaScript. It doesn't run correctly in Chrome right now because they have issues with their JavaScript environment not supporting large numbers of variables for a given context. It doesn't run in IE because IE doesn't support webGL. Both of these will be fixed in the future.