What we need is support for optimized/hw accelerated versions of JS libraries in browser.
Eample:
A page declares that it will use library foo, e.g. <lib name="foo" version="^1.0"/>. Browser, e.g. firefox, looks into common repository and sees that there is two versions of "foo": one generic, and one optimized for firefox-x86_64, with native code, so it used optimized version instead.
Of course, code must come from trusted source and be signed, to reduce risks.
What JS really needs is WebCL. That will revolutionize JS capabilities.