3 ms·
I'd say most of this is due to the issue of adoption. You can come up with a standard for native code, but if you can only run it in one browser that's basicall
by ant6n 11y ago
I'd say most of this is due to the issue of adoption. You can come up with a standard for native code, but if you can only run it in one browser that's basically useless. Even if all browser suddenly implemented some new native standard, then all existing browser instances that can't/won't be updated can't access your new shiny website.
Another issue is that native code, assuming that it's secure, is still not portable across different architectures. So you still end up having to have some sort of VM anyway to ensure portability.
That's basically where asm.js comes in. It's a static subset of javascript that allows it to be compiled, it becomes a VM. But since it is javascript, it will work on all existing browsers, they don't need to support a new standard. It'll just be slower.