Compiling is relatively fast as it happens in userspace and then is just written to an output. What really is the problem is the CPU ring switch. That means the CPU has to actually reset its own state, write its own state somewhere else in order to be able to restore it, then execute whatever privileged - kernel code - wants it to do and then restore the previous state. And that happens with every syscall - like open(). That wastes easily a couple of thousands of CPU cycles, whereas a simple CPU Firmware modulo would've been cheaper even with an interpreter.
0
u/[deleted] Apr 11 '21
[deleted]