18 points · by DaniFong · 17y ago · 19 comments
In both cases, the plugin has to provide a system call interface to do anything "interesting" with the client. That system call interface is either too trivial to enable interesting applications, or so complicated that it, not the instruction analyzer, is going to be the primary attack surface of the plugin.
It is shocking, though.
There's a good reason we wrote x264 in C: can you imagine trying to write a performance-critical app like that in Java?
The assembly alone contributes a 5-7x performance increase: the difference between running real-time HDTV encoding and being stuck making video for iPods. It is literally the difference between having a working business model and not having a working business model.
People in the web world always think they can get away with purely interpreted and JIT'd languages until they realize they actually have do things like encode and decode video, and suddenly even pure C isn't anywhere near fast enough.
Obviously today's bytecode JITs aren't faster than C or C+assembly. But if you're going to pick a platform to innovate on, I'm saying it's not a total no-brainer to think about JIT (well-understood and working) instead of x86 verification (poorly-understood, science project).
The interesting thing is that now the plugin developer controls the system call interface, not the OS. They could develop a suitable layer of abstraction for a lot of things that you'd ordinarily need an OS for, and would go out of your mind to port.