You're right that a lot of the scaling probably happens with the GPU, and that Emscripten-generated code is still the most performant javascript possible (no GC, consistently typed for inference, etc).
I think there are places where the CPU is the bottleneck though, since we're talking about crazy complex 3d games. Managing a large scene graph, and updating physics are some examples. Simply reducing the viewable distance is a huge help when you are CPU bottlenecked for those reasons (most likely physics).
Agreed that no matter what, the Unreal port will help optimize the typed array/no GC code path! Exciting times.
Modern game engines also leverage SIMD and multi-core SMP. Javascript is inherently single threaded. While there is hope in retrofitting SIMD in (Rivertrail ParallelArrays or Dart's recent work with new SIMD TypedArrays), I don't see any path for supporting multithreading. JS is inherently async and singlethreaded in its memory model.
WebWorkers are not really a multithread model. Game engines could be written to leverage message passing based isolates, but in some cases, but doing it in an optimal form isn't exactly developer friendly, it's one of pains of developing the PS3 SPEs is that they didn't share system memory and you had to DMA stuff around.
Agreed. So we are getting together with John McCutchan who did Dart SIMD intrinsics to do same for JS via Ecma TC39 Harmony process and rapid prototyping in SpiderMonkey -- and I hope in V8 as well.
+1 to adding the SIMD Dart types into JS. This is how I like to see Google and Mozilla working together to improve the web. (WebRTC is another fabulous cooperation)
I think there are places where the CPU is the bottleneck though, since we're talking about crazy complex 3d games. Managing a large scene graph, and updating physics are some examples. Simply reducing the viewable distance is a huge help when you are CPU bottlenecked for those reasons (most likely physics).
Agreed that no matter what, the Unreal port will help optimize the typed array/no GC code path! Exciting times.