3 ms·
True in the sense of multiple cores, instead of just asynchronous execution on a single thread. Anyhow, it was just an example... What I'm trying to say is that
by thsealienbstrds 12y ago
True in the sense of multiple cores, instead of just asynchronous execution on a single thread. Anyhow, it was just an example... What I'm trying to say is that we want to really explore the capabilities of the web as a platform for computing, as much as possible. Therefore we need as much flexibility, tooling, languages, you name it, as possible. I'm actually suggesting the 'C++' way of creating a platform... i.e. stuff it with as much flexibility as you possibly (reasonably) can and then let natural selection do its work. JavaScript ain't it.
- Turing_Machine 12y agoC++ can be compiled to Javascript that runs at reasonable speeds (not just toy applications, either). See: https://github.com/kripken/emscripten/wiki https://github.com/kripken/emscripten/wiki And yep, I was right. Web workers do make use of multiple cores, and there's at least one parallel programming library that takes advantage of it: http://adambom.github.io/parallel.js/ http://adambom.github.io/parallel.js/
- sgrove 12y agoWeb workers are atrocious though. They're very strangely hobbled by either requiring a serialize->deserialize round-trip when passing data back and forth, or you can sidestep it by 'transferring' the object across contexts (it then 'disappears' in the original context). The reasons for doing it rather than sharing are obvious (the race conditions would be hard to track down, etc.) - but there's no escape hatch for languages like ClojureScript which has immutable data-structures (and therefore don't care about mutable race conditions) and persistent/structural-sharing datastructures (and therefore would be very costly to serialize/deserialize, or totally broken by the transfer model). Really a shame.
- thsealienbstrds 12y agoI ran the Quake 3 demo. It was frameskipping all over. Performance was not acceptable for even playing. I think 10-15 fps. No, its not my laptop. My laptop has no problems with real Quake 3. I want to ask you to take a step back and look at it purely from a black box perspective. Forget about JavaScript for a moment. Is it really your opinion this is reasonable performance?
- Turing_Machine 12y agoFor playing Quake? Maybe not. For running any application that spends 99% of its time waiting for the user to press a key (which is most of them)? Sure. No problem at all.
- thsealienbstrds 12y agoAnd maybe that is todays reality because JavaScript cant really do anything else. Give a kid a hammer and all problems become nails.