I've heard that asm.js and similar projects allow near native speed execution of C/C++ via javascript. If I've remembered what I've been told correctly (which isn't necessarily the case, as I wasn't paying a huge amount of attention, and think I might be muddling two things), instead of directly running javascript, you compile the C/C++ into some intermediate format (basically a universal assembly) but that is guaranteed to not have anything that would prevent static recompilation, and so instead of interpreting or JITing it, it can be recompiled at load time, and during actual execution you're just running native machine code.
OS: Windows 10 64 bit Professional
CPU: AMD Ryzen 5900X
RAM: 48GB
GPU: Radeon 7800 XT
CPU: AMD Ryzen 5900X
RAM: 48GB
GPU: Radeon 7800 XT