4 ms·
In all seriousness: Why? What do we gain from doing the decoding in JavaScript, besides the "cool" factor? I can see how this would allow more flexibility, sin
by B-Con 13y ago
In all seriousness: Why? What do we gain from doing the decoding in JavaScript, besides the "cool" factor?
I can see how this would allow more flexibility, since a codec could be downloaded at run-rime, which would remove the need for media to only be packaged in codecs with native, cross-browser support.
But is there any chance this could be even close to as efficient, CPU or power-wise, as the current standard native browser codec support?
- gluxon 13y agoThe power in this is that JavaScript is extensively portable and very consistent across platforms. There are no issues with cross platform support that plagues C++ and to an extent, Java's JVM. There's no possibility of platform lock-in, which happens for .NET applications. I don't like how this article is written at all. It leaves a bias afterlook that Mozilla's goal here is to create a toy. JavaScript is the fastest interpreted language and plans are out to make it even speedier. There's a reason why "the future" is emphasized. Perhaps I am biased as a Node.js programmer, but I do believe this is a good thing. JavaScript is seriously pretty sweet. I do like the design of the language. There are features that outblow many other languages.
- simfoo 13y ago> JavaScript is the fastest interpreted language and plans are out to make it even speedier. Citation needed
- gluxon 13y agoWith JIT compilation, asm.js, tracing, it is hard to argue against. A long fought browser war really brought out the maximum capabilities of the JavaScript engine. http://en.wikipedia.org/wiki/JavaScript_engine#Performance_evolution http://en.wikipedia.org/wiki/JavaScript_engine#Performance_e... asm.js promises speed 2x slower than native code. For interpreted code, that is amazing.
- gcr 13y agoNone of those are interpreters. You're trying to compare Javascript against other JITted / compiled languages. Mozilla themselves claim that asm.js is only about 2x slower than C.
- ndesaulniers 13y agoHow about JavaScript is the fastest dynamically typed language?
- messel 13y agois it outperforming lua jit in all or many benchmarks? It's been a while since I rolled up my sleeves and ran various algorithms in js vs lua vs py (pypy was speedy as well last I checked). asm.js isn't dynamically typed afaik, so I think of a fair comparison as v8 vs luajit
- gcr 13y ago> JavaScript is the fastest interpreted language... A nitpick: Current Javascript implementations are fast specifically because they are not interpreted. Look at V8 or JagerMonkey; those are JITting compilers, not interpreters.
- jcromartie 13y agoWhat? There is plenty of platform lock-in going on with JavaScript code. Much of the most interesting JS written today uses APIs that are limited to certain browsers or runtimes. asm.js is only supported by Mozilla for now.
- kierank 13y agoBecause video codecs are written in C++ and Java?
- zmanian 13y agoIf there is widespread adoption of the Otoy's technology, it will be because their encode technology efficient enough to enable a multi-client per server low latency applications that are not possible because H.264 encoding is a compute and latency bottleneck for current applications.
- johansch 13y agoThe power comes from: a) fitting perfectly in the business model of Mozilla Corp. b) the voluminous and unwavering support they can expect from their fan base.