If programmed to run natively under the host operating system, they would certainly run much better than running in the browser. WebAssembly is the answer put forward for this problem.
Unlike Javascript, all the code a programmer writes is parsed and compiled ahead of time before reaching the browser. The browser then just sees low-level, machine-ready instructions it can quickly validate, optimize, and run.
Programs written in languages like C/C++ can be ported to the web so they run with near-native performance with WebAssembly, using accompanying tools.
Mozilla released Firefox 52 (32-bit / 64-bit) today, making it the first major browser to support WebAssembly, but all major vendors have committed to supporting the emerging standard.
Soon, running modern 3D, resource-hungry video games and apps in browser will be a normal thing, while older web applications will likely be ported to a WebAssembly alternative to vastly improve their performance.
Here is a video demonstrating Epic's "Zen Garden" demo running in Firefox. The demo is built with WebAssembly and WebGL 2.