3 ms·
Modern game engines also leverage SIMD and multi-core SMP. Javascript is inherently single threaded. While there is hope in retrofitting SIMD in (Rivertrail Par
by cromwellian 14y ago
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.
- maksimlin 14y agoPerhaps this is the path you weren't seeing: http://smallcultfollowing.com/babysteps/blog/2013/03/20/parallel-js-lands/ http://smallcultfollowing.com/babysteps/blog/2013/03/20/para...
- cromwellian 14y agoI already mentioned RiverTrail stuff in another response. I don't really think it is a replacement for SSE/AVX/NEON/AltiVec.
- BrendanEich 14y agoAgreed. 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. /be
- cromwellian 14y ago+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)