3 ms·
This seems like the right approach going forward, as long as JavaScript engines continue to approach the performance of native code. This approach keeps codec
by JoshTriplett 15y ago
This seems like the right approach going forward, as long as JavaScript engines continue to approach the performance of native code. This approach keeps codec implementations in the JavaScript sandbox where they can't provide new exploits, rather than extending the attack surface with large, frequently exploited codecs.
In general, JavaScript seems like the right approach for anything that doesn't require special privileges to do, and for that the APIs should focus on creating the minimum possible interface that lets JavaScript do all the interesting work.
- modeless 15y agoI'd like to agree, but this makes a good benchmark, and right now it's showing that JavaScript is about 20 times slower than native code on my machine in both Chrome and Firefox. That's completely unacceptable for video decoding. In fact, even if JavaScript was just as fast as native code it would still be unacceptable for mobile video, where hardware acceleration is required for acceptable performance and battery life.
- devongovett 15y agoJust wait until browsers start supporting WebCL and we can do video decoding on the graphics card :)
- moonchrome 15y agoI'm betting WebCL running on CPU cores will beat JS by 20x margin as well.