Excellent in-depth analysis on getting pages to start-up faster from Addy Osmani, a Google Chrome engineer. The whole thing is deep and worth reading. This part especially struck me:

Every few years, it’s proposed engines offer a way to precompile scripts so we don’t waste time parsing or compiling code pops up. The idea is if instead, a build-time or server-side tool can just generate bytecode, we’d see a large win on start-up time. My opinion is shipping bytecode can increase your load-time (it’s larger) and you would likely need to sign the code and process it for security. V8’s position is for now we think exploring avoiding reparsing internally will help see a decent enough boost that precompilation may not offer too much more, but are always open to discussing ideas that can lead to faster startup times. That said, V8 are exploring being more aggressive at compiling and code-caching scripts when you update a site in a Service Worker and we hope to see some wins with this work.

If browsers could be given bytecode, then that would open up a world where JavaScript is no longer king of the browser. You could write in any language you want, so long as it compiles down to the appropriate bytecode. You can already escape the world of JavaScript to an extent by writing in a superset like TypeScript and then compiling it down to JavaScript, but writing websites in JavaScript will always be mainstream until browsers can accept bytecode. Three levels of code is just too much to really be performant and practical.

JavaScript is my favorite programming language, but it’s still fun to think about a future where developers have alternatives. A huge reason I like JavaScript is because I know the things it can do in a browser that no other language currently can do.